aboutsummaryrefslogtreecommitdiff
path: root/go
diff options
context:
space:
mode:
Diffstat (limited to 'go')
-rw-r--r--go/client/game.go2
-rw-r--r--go/client/main.go6
-rw-r--r--go/client/startMenu.go2
-rw-r--r--go/ui/colors.go4
4 files changed, 6 insertions, 8 deletions
diff --git a/go/client/game.go b/go/client/game.go
index 6c2f41e0..72bb9c4e 100644
--- a/go/client/game.go
+++ b/go/client/game.go
@@ -112,7 +112,7 @@ func (g *Game) loadMap(mapName string) *Game {
func (g *Game) addActivePlayer(name string, deckList string) *Game {
deck := game.NewDeckFromDeckList(deckList)
- color := playerColors[len(g.gameState.Players())]
+ color := ui.PlayerColors[len(g.gameState.Players())]
g.gameState.AddNewPlayer(name, deck, color)
p := g.gameState.PlayerByName(name)
g.activePlayerId = p.Id
diff --git a/go/client/main.go b/go/client/main.go
index c696ccf7..4d46ed9a 100644
--- a/go/client/main.go
+++ b/go/client/main.go
@@ -2,7 +2,6 @@ package main
import (
"flag"
- "image/color"
"io"
"log"
"os"
@@ -17,11 +16,6 @@ const (
WINDOW_HEIGHT = 1024
)
-var playerColors = []color.RGBA{
- {1, 0xff, 1, 0xff},
- {1, 1, 0xff, 0xff},
-}
-
var startDeckPath string
type app struct {
diff --git a/go/client/startMenu.go b/go/client/startMenu.go
index 0fc7cbe7..d9dac913 100644
--- a/go/client/startMenu.go
+++ b/go/client/startMenu.go
@@ -143,7 +143,7 @@ func (m *StartMenu) startGame() {
if m.mapPath == "the-kraken" {
idx := len(g.gameState.Players())
- color := playerColors[idx]
+ color := ui.PlayerColors[idx]
g.gameState.AddNewAiPlayer("kraken", color)
}
diff --git a/go/ui/colors.go b/go/ui/colors.go
index 1f3fcb6c..49085f1b 100644
--- a/go/ui/colors.go
+++ b/go/ui/colors.go
@@ -11,3 +11,7 @@ var (
HighlightSelectionColor = color.RGBA{0xc7, 0x89, 0x33, 0xff}
HighlightOptionColor = color.RGBA{0xc7, 0x52, 0x33, 0xff}
)
+
+var PlayerColors = []color.RGBA{
+ {1, 0xff, 1, 0xff},
+ {1, 1, 0xff, 0xff}}