Implemented boats spawning in parallel at the start line with spacing.

Added two more colours to support up to eight boats.

#story[1117]
This commit is contained in:
Zhi You Tan
2017-08-05 00:31:36 +12:00
parent 8af80e6c3a
commit a727014fcb
3 changed files with 42 additions and 25 deletions
+2 -2
View File
@@ -6,12 +6,12 @@ import javafx.scene.paint.Color;
* Enum for generating colours.
*/
public enum Colors {
RED, PERU, SEAGREEN, GREEN, BLUE, PURPLE;
RED, PERU, GOLD, GREEN, BLUE, PURPLE, DEEPPINK, GRAY;
static Integer index = 0;
public static Color getColor() {
if (index == 6) {
if (index == 8) {
index = 0;
}
return Color.valueOf(values()[index++].toString());
+4
View File
@@ -406,4 +406,8 @@ public class Yacht {
public void addLocationListener (YachtLocationListener listener) {
locationListeners.add(listener);
}
public void setLocation(GeoPoint geoPoint) {
location = geoPoint;
}
}