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:
Generated
+17
-1
@@ -1,11 +1,27 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
|
<resourceExtensions />
|
||||||
|
<wildcardResourcePatterns>
|
||||||
|
<entry name="!?*.java" />
|
||||||
|
<entry name="!?*.form" />
|
||||||
|
<entry name="!?*.class" />
|
||||||
|
<entry name="!?*.groovy" />
|
||||||
|
<entry name="!?*.scala" />
|
||||||
|
<entry name="!?*.flex" />
|
||||||
|
<entry name="!?*.kt" />
|
||||||
|
<entry name="!?*.clj" />
|
||||||
|
<entry name="!?*.aj" />
|
||||||
|
</wildcardResourcePatterns>
|
||||||
<annotationProcessing>
|
<annotationProcessing>
|
||||||
<profile name="Maven default annotation processors profile" enabled="true">
|
<profile default="true" name="Default" enabled="false">
|
||||||
|
<processorPath useClasspath="true" />
|
||||||
|
</profile>
|
||||||
|
<profile default="false" name="Maven default annotation processors profile" enabled="true">
|
||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
<outputRelativeToContentRoot value="true" />
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<processorPath useClasspath="true" />
|
||||||
<module name="app" />
|
<module name="app" />
|
||||||
</profile>
|
</profile>
|
||||||
</annotationProcessing>
|
</annotationProcessing>
|
||||||
|
|||||||
Generated
+3
@@ -0,0 +1,3 @@
|
|||||||
|
<component name="CopyrightManager">
|
||||||
|
<settings default="" />
|
||||||
|
</component>
|
||||||
Generated
+28
-40
@@ -1,42 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ClientPropertiesManager">
|
<component name="EntryPointsManager">
|
||||||
<properties class="javax.swing.AbstractButton">
|
<entry_points version="2.0" />
|
||||||
<property name="hideActionText" class="java.lang.Boolean" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.JComponent">
|
|
||||||
<property name="html.disable" class="java.lang.Boolean" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.JEditorPane">
|
|
||||||
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
|
|
||||||
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
|
|
||||||
<property name="charset" class="java.lang.String" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.JList">
|
|
||||||
<property name="List.isFileList" class="java.lang.Boolean" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.JPasswordField">
|
|
||||||
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.JSlider">
|
|
||||||
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
|
|
||||||
<property name="JSlider.isFilled" class="java.lang.Boolean" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.JTable">
|
|
||||||
<property name="Table.isFileList" class="java.lang.Boolean" />
|
|
||||||
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
|
|
||||||
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.JToolBar">
|
|
||||||
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.JTree">
|
|
||||||
<property name="JTree.lineStyle" class="java.lang.String" />
|
|
||||||
</properties>
|
|
||||||
<properties class="javax.swing.text.JTextComponent">
|
|
||||||
<property name="caretAspectRatio" class="java.lang.Double" />
|
|
||||||
<property name="caretWidth" class="java.lang.Integer" />
|
|
||||||
</properties>
|
|
||||||
</component>
|
</component>
|
||||||
<component name="MavenProjectsManager">
|
<component name="MavenProjectsManager">
|
||||||
<option name="originalFiles">
|
<option name="originalFiles">
|
||||||
@@ -45,10 +10,33 @@
|
|||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="false" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK">
|
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||||
|
<OptionsSetting value="true" id="Add" />
|
||||||
|
<OptionsSetting value="true" id="Remove" />
|
||||||
|
<OptionsSetting value="true" id="Checkout" />
|
||||||
|
<OptionsSetting value="true" id="Update" />
|
||||||
|
<OptionsSetting value="true" id="Status" />
|
||||||
|
<OptionsSetting value="true" id="Edit" />
|
||||||
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="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="masterDetails">
|
||||||
<configuration>$USER_HOME$/.subversion</configuration>
|
<states>
|
||||||
|
<state key="ProjectJDKs.UI">
|
||||||
|
<settings>
|
||||||
|
<last-edited>1.8</last-edited>
|
||||||
|
<splitter-proportions>
|
||||||
|
<option name="proportions">
|
||||||
|
<list>
|
||||||
|
<option value="0.2" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</splitter-proportions>
|
||||||
|
</settings>
|
||||||
|
</state>
|
||||||
|
</states>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -17,7 +17,16 @@ public class Race {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void simulateRace(){
|
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) {
|
for (Event event: events) {
|
||||||
Timer timer = new Timer();
|
Timer timer = new Timer();
|
||||||
timer.schedule(new TimerTask(){
|
timer.schedule(new TimerTask(){
|
||||||
|
|||||||
Reference in New Issue
Block a user