Implemented list of boats in order of last feature passed.

- Update controller every time boats pass a mark
- Cleared info table to force update
#story [15]
This commit is contained in:
cbt24
2017-03-17 13:29:33 +13:00
parent 3751ee2488
commit b25389f212
4 changed files with 31 additions and 25 deletions
+4 -2
View File
@@ -5,6 +5,8 @@ import seng302.Model.BoatInRace;
import seng302.Model.ConstantVelocityRace;
import seng302.Model.Leg;
import java.util.ArrayList;
/**
* Created by esa46 on 15/03/17.
*/
@@ -16,8 +18,8 @@ public class RaceTest {
BoatInRace boat = new BoatInRace("NZ", 240);
BoatInRace[] boats = new BoatInRace[] {boat};
Leg leg1 = new Leg("first leg", 1, new GPSCoordinate(0, 0), new GPSCoordinate(3, 4), 0);
Leg[] legs = new Leg[] {leg1};
ArrayList<Leg> legs = new ArrayList<>();
legs.add(new Leg("Start", 1, new GPSCoordinate(0,0), new GPSCoordinate(1,1), 0));
ConstantVelocityRace race = new ConstantVelocityRace(boats, legs);
race.run();
}