battleship-go

Terminal-based battleship written in Go (WIP).
Log | Files | Refs | README | LICENSE

commit 42e7425f98abf04ff770c7ad51b5494a6dfc6238
parent 9fdf6f47ef19f354586361ad2ad9ae3acd8f6419
Author: Benjamin Chausse <benjamin@chausse.xyz>
Date:   Fri, 10 Jan 2020 23:50:19 -0500

Cool new colors for the target board

Diffstat:
Mmain.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.go b/main.go @@ -286,12 +286,12 @@ func RedrawTarget(plyr *player, table *tv.Table) { table.Clear() for r := 0; r < 11; r++ { for c := 0; c < 11; c++ { - color, selectable := tc.ColorDarkBlue, true + color, selectable := tc.ColorDarkCyan, true if r < 1 || c < 1 { color, selectable = tc.ColorPurple, false } - if boardData[r*11+c] != `~` { - selectable = false + if boardData[r*11+c] != `~` && !(r < 1 || c < 1) { + selectable, color = false, tc.ColorRed } table.SetCell(r, c, tv.NewTableCell(boardData[r*11+c]).