aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAli Yousuf <aly.yousuf7@gmail.com>2017-04-14 17:59:51 +0500
committerAli Yousuf <aly.yousuf7@gmail.com>2017-05-02 20:31:53 +0500
commit49a9743c766568aa78d99dac66efb3b8bd569d82 (patch)
tree7dc49a4277a95db205ee7ff56bbec20b09ddcf82
parent21653d3217598d54708acad75ed32e9e2b40c9a5 (diff)
downloadsshtron-49a9743c766568aa78d99dac66efb3b8bd569d82.tar.gz
Add yellow, blue and white colors
-rw-r--r--game.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/game.go b/game.go
index e5c5423..ffa80cf 100644
--- a/game.go
+++ b/game.go
@@ -95,8 +95,11 @@ const (
playerRed = color.FgRed
playerGreen = color.FgGreen
+ playerYellow = color.FgYellow
+ playerBlue = color.FgBlue
playerMagenta = color.FgMagenta
playerCyan = color.FgCyan
+ playerWhite = color.FgWhite
PlayerUp PlayerDirection = iota
PlayerLeft
@@ -104,21 +107,29 @@ const (
PlayerRight
)
-var playerColors = []color.Attribute{playerRed, playerGreen, playerMagenta,
- playerCyan}
+var playerColors = []color.Attribute{
+ playerRed, playerGreen, playerYellow, playerBlue,
+ playerMagenta, playerCyan, playerWhite,
+}
var playerBorderColors = map[color.Attribute]color.Attribute{
playerRed: color.FgHiRed,
playerGreen: color.FgHiGreen,
+ playerYellow: color.FgHiYellow,
+ playerBlue: color.FgHiBlue,
playerMagenta: color.FgHiMagenta,
playerCyan: color.FgHiCyan,
+ playerWhite: color.FgHiWhite,
}
var playerColorNames = map[color.Attribute]string{
playerRed: "Red",
playerGreen: "Green",
+ playerYellow: "Yellow",
+ playerBlue: "Blue",
playerMagenta: "Magenta",
playerCyan: "Cyan",
+ playerWhite: "White",
}
type PlayerTrailSegment struct {
@@ -129,6 +140,7 @@ type PlayerTrailSegment struct {
type Player struct {
s *Session
+ Name string
CreatedAt time.Time
Direction PlayerDirection
Marker rune
Un proyecto texto-plano.xyz