From c5564510eb1abc4ab0c9528cc5ad719079f4fe37 Mon Sep 17 00:00:00 2001 From: Andrew Guibert Date: Wed, 16 May 2018 11:21:35 -0500 Subject: [PATCH] Update player colors to orange/green/blue/purple --- frontend/prebuild/src/app/entity/player.tooltip.ts | 2 +- .../src/main/java/org/libertybikes/game/core/Player.java | 8 ++++---- .../src/main/java/org/libertybikes/game/maps/GameMap.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/prebuild/src/app/entity/player.tooltip.ts b/frontend/prebuild/src/app/entity/player.tooltip.ts index 28ee005..dcc645a 100644 --- a/frontend/prebuild/src/app/entity/player.tooltip.ts +++ b/frontend/prebuild/src/app/entity/player.tooltip.ts @@ -13,7 +13,7 @@ export class PlayerTooltip { constructor(public player: Player) { if (!this.player.color) console.log('WARNING: Creating a tooltip with a player that is not properly initialized'); - this.nameText = new Text(this.player.name, "28px Arial", "#fff"); + this.nameText = new Text(this.player.name, "28px Arial", "#000"); this.nameText.textAlign = 'center'; this.nameText.maxWidth = 200; this.shape.graphics.beginFill(this.player.color) diff --git a/game-service/src/main/java/org/libertybikes/game/core/Player.java b/game-service/src/main/java/org/libertybikes/game/core/Player.java index c972ad7..4ce5cb3 100644 --- a/game-service/src/main/java/org/libertybikes/game/core/Player.java +++ b/game-service/src/main/java/org/libertybikes/game/core/Player.java @@ -62,13 +62,13 @@ public class Player { if (playerNum >= MAX_PLAYERS) throw new IllegalArgumentException("Cannot create player number " + playerNum + " because MAX_PLAYERS=" + MAX_PLAYERS); if (playerNum == 0) { - color = "#DF740C"; + color = "#f28415"; // orange } else if (playerNum == 1) { - color = "#FF0000"; + color = "#ABD155"; // bright green } else if (playerNum == 2) { - color = "#6FC3DF"; + color = "#6FC3DF"; // light blue } else { - color = "#FFE64D"; + color = "#c178c9"; // light purple } } diff --git a/game-service/src/main/java/org/libertybikes/game/maps/GameMap.java b/game-service/src/main/java/org/libertybikes/game/maps/GameMap.java index 2d746e2..65ea845 100644 --- a/game-service/src/main/java/org/libertybikes/game/maps/GameMap.java +++ b/game-service/src/main/java/org/libertybikes/game/maps/GameMap.java @@ -14,7 +14,7 @@ import org.libertybikes.game.core.Obstacle; public class GameMap { - public static final int NUM_MAPS = 4; // Not including empty map + public static final int NUM_MAPS = 5; // Not including empty map private static final Random r = new Random(); /**