added skeleton for StreamedRace and StreamedCourse #Pair[jjg64, cbt24] #Story[782]

This commit is contained in:
Joseph Gardner
2017-04-21 13:28:55 +12:00
parent a85bf292d5
commit 9e3ca68df8
7 changed files with 608 additions and 103 deletions
@@ -0,0 +1,56 @@
package seng302.Mock;
import javafx.collections.FXCollections;
import seng302.Controllers.RaceController;
import seng302.Model.BoatInRace;
import seng302.Model.Leg;
import seng302.Model.Race;
import seng302.RaceDataSource;
import java.util.*;
/**
* Created by jjg64 on 21/04/17.
*/
public class StreamedRace extends Race{
private RaceDataSource raceData;
public StreamedRace(RaceDataSource raceData, RaceController controller, int scaleFactor) {
super(raceData.getBoats(), raceData.getLegs(), controller, scaleFactor);
this.raceData = raceData;
}
public void initialiseBoats() {
}
/**
* Checks if the boat cannot finish the race
* @return True if boat cannot finish the race
*/
protected boolean doNotFinish() {
return false;
}
/**
* Checks the position of the boat, this updates the boats current position.
*
* @param boat Boat that the postion is to be updated for.
* @param timeElapsed Time that has elapse since the start of the the race.
* @see BoatInRace
*/
protected void checkPosition(BoatInRace boat, long timeElapsed) {
}
/**
* Updates the boat's gps coordinates
*
* @param boat to be updated
* @param millisecondsElapsed time since last update
*/
protected void updatePosition(BoatInRace boat, int millisecondsElapsed) {
}
}