diff options
Diffstat (limited to 'internal/game/render_roulette.go')
| -rw-r--r-- | internal/game/render_roulette.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/game/render_roulette.go b/internal/game/render_roulette.go index a0f1e04..89c14c6 100644 --- a/internal/game/render_roulette.go +++ b/internal/game/render_roulette.go @@ -134,7 +134,7 @@ func renderRouletteRacetrack(mode string, unicode bool) string { pocket := func(x, y, index, width int) { n := wheel[index%len(wheel)] bg, name := roulettePocketColor(n) - if mode == "none" || mode == "" { + if color.Plain(mode) { n += name[:1] } put(x, y, rouletteCenter(n, width), bg) @@ -318,7 +318,7 @@ func renderRouletteLayout(double, racetrack bool, mode string, unicode bool) str case !double && row == 2: zero = "0" } - if mode == "none" || mode == "" { + if color.Plain(mode) { zero += "G" } // The 0/00 lane is one green rectangle, so its blank cells above and @@ -327,7 +327,7 @@ func renderRouletteLayout(double, racetrack bool, mode string, unicode bool) str for n := row; n <= 36; n += 3 { pocket := strconv.Itoa(n) bg, name := roulettePocketColor(pocket) - if mode == "none" || mode == "" { + if color.Plain(mode) { pocket += name[:1] } line += roulettePaint(mode, rouletteCenter(pocket, 4), bg) + rouletteInk(mode, b.v) @@ -382,7 +382,7 @@ func renderRouletteLayout(double, racetrack bool, mode string, unicode bool) str } bottom += b.br lines = append(lines, line, rouletteInk(mode, bottom)) - if mode == "none" || mode == "" { + if color.Plain(mode) { lines = append(lines, "R = red, B = black, G = green") } return strings.Join(lines, "\n") @@ -419,7 +419,7 @@ func renderRouletteWheel(wheel []string, mode string, unicode bool) string { grid[y][x] = rouletteCell{' ', -1} } } - plain := mode == "none" || mode == "" + plain := color.Plain(mode) pocketRune := func(bg int) rune { if !plain { return ' ' @@ -553,7 +553,7 @@ func renderRouletteRow(row []rouletteCell, mode string) string { j++ } text := string(seg) - if bg >= 0 && mode != "none" && mode != "" { + if bg >= 0 && !color.Plain(mode) { sb.WriteString(roulettePaint(mode, text, bg)) } else { sb.WriteString(rouletteInk(mode, text)) @@ -584,7 +584,7 @@ func renderRouletteResult(pockets [5]string, mode string, unicode bool, size int ballRow := size / 2 hasRule := ballRow > ruleRow colorRow := size - 2 - plain := mode == "none" || mode == "" + plain := color.Plain(mode) var lines []string for row := 0; row < size; row++ { var cells []string |
