added skeleton for StreamedRace and StreamedCourse #Pair[jjg64, cbt24] #Story[782]
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package seng302.Mock;
|
||||
|
||||
import seng302.GPSCoordinate;
|
||||
import seng302.Model.BoatInRace;
|
||||
import seng302.Model.Leg;
|
||||
import seng302.RaceDataSource;
|
||||
import seng302.XMLReader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by jjg64 on 21/04/17.
|
||||
*/
|
||||
public class StreamedCourse implements RaceDataSource {
|
||||
XMLReader xmlReader;
|
||||
List<GPSCoordinate> boundary = new ArrayList<>();
|
||||
|
||||
public StreamedCourse(XMLReader xmlReader) {
|
||||
this.xmlReader = xmlReader;
|
||||
}
|
||||
|
||||
public List<BoatInRace> getBoats() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Leg> getLegs() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<GPSCoordinate> getBoundary() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public GPSCoordinate getMark() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public GPSCoordinate getMapTopLeft() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public GPSCoordinate getMapBottomRight() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user