mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Added finishing events #implement and rotated the map by 180 degrees#fix
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user