Added finishing events #implement and rotated the map by 180 degrees#fix

This commit is contained in:
Michael Rausch
2017-03-22 12:51:03 +13:00
parent 00f9cc4698
commit ef098e63d7
11 changed files with 168 additions and 63 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
package seng302.models;
import seng302.models.mark.Mark;
import seng302.models.mark.SingleMark;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -40,7 +39,7 @@ public class Event {
* @param eventTime, what time the event happens
* @param eventBoat, the boat that the event belongs to
*/
public Event(Double eventTime, Boat eventBoat, SingleMark mark1) {
public Event(Double eventTime, Boat eventBoat, Mark mark1) {
this.time = eventTime;
this.boat = eventBoat;
this.mark1 = mark1;
+6 -1
View File
@@ -104,8 +104,9 @@ public class Race {
// There are no more marks after this event
else{
Event event = new Event(time, boat, course.get(i), course.get(i));
Event event = new Event(time, boat, course.get(i));
events.get(boat).add(event);
}
}
}
@@ -132,4 +133,8 @@ public class Race {
public HashMap<Boat, List> getEvents() {
return events;
}
public void setBoatFinished(Boat boat){
this.finishingOrder.add(boat);
}
}