Added Display of all Boats participating in the race, and a message to seperate this and the events in the console.
This commit is contained in:
@@ -17,7 +17,16 @@ public class Race {
|
||||
}
|
||||
|
||||
public void simulateRace(){
|
||||
//printRace()
|
||||
//show the boats participating.
|
||||
System.out.println("Boats Participating.");
|
||||
System.out.println("====================");
|
||||
for (int i = 0; i < boats.length; i ++){
|
||||
System.out.println(i + 1 + ". " + boats[i].getName());
|
||||
}
|
||||
|
||||
System.out.println("\nRace Events");
|
||||
System.out.println("====================");
|
||||
//show all the events that happen in the race
|
||||
for (Event event: events) {
|
||||
Timer timer = new Timer();
|
||||
timer.schedule(new TimerTask(){
|
||||
|
||||
Reference in New Issue
Block a user