Added mark and gate events to race

This commit is contained in:
cbt24
2017-03-03 11:46:52 +13:00
parent 02cc98b0b6
commit 2148c1e06d
2 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -45,7 +45,7 @@
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
<component name="SvnConfiguration"> <component name="SvnConfiguration">
+14 -5
View File
@@ -1,7 +1,9 @@
package seng302; package seng302;
public class App import java.util.ArrayList;
public class App
{ {
public static void main( String[] args ) public static void main( String[] args )
{ {
@@ -13,10 +15,17 @@ public class App
Boat boat6 = new Boat("SoftBank Team Japan"); Boat boat6 = new Boat("SoftBank Team Japan");
Boat[] all_boats = {boat1, boat2, boat3, boat4, boat5, boat6}; Boat[] all_boats = {boat1, boat2, boat3, boat4, boat5, boat6};
Boat[] boats = {all_boats[0], all_boats[1]}; Boat[] boats = {all_boats[0], all_boats[1]};
Event start = new Event("Start", boats);
Event finish = new Event("Finish", boats);
System.out.println(start); ArrayList<Event> events = new ArrayList<Event>();
System.out.println(finish); events.add(new Event("Start", boats));
events.add(new Event("Mark", boats));
events.add(new Event("Leeward Gate", boats));
events.add(new Event("Windward Gate", boats));
events.add(new Event("Leeward Gate", boats));
events.add(new Event("Finish", boats));
for(Event event:events) {
System.out.println(event);
}
} }
} }