This commit is contained in:
cjdenio committed 2026-09-03 22:38:48 -06:00
1 parent bb03f8c3c5
commit 7bb0f00e71
1 file changed
+4 -1
+4 -1
View File
@@ -216,7 +216,7 @@ func (state *State) RenderUI() int {
switch state.SolveState { switch state.SolveState {
case 1: case 1:
fmt.Print("\r\nThe puzzle was filled, but at least 1 letter is incorrect...\r\n") fmt.Printf("\r\n%s\r\n", AnsiRed("The puzzle was filled, but at least 1 letter is incorrect..."))
uiHeight += 2 uiHeight += 2
case 2: case 2:
fmt.Printf("\r\n%s\r\n", AnsiGreen("The puzzle was solved!")) fmt.Printf("\r\n%s\r\n", AnsiGreen("The puzzle was solved!"))
@@ -254,6 +254,9 @@ func AnsiDimmed(s string) string {
func AnsiGreen(s string) string { func AnsiGreen(s string) string {
return fmt.Sprintf("\x1b[32m%s\x1b[0m", s) return fmt.Sprintf("\x1b[32m%s\x1b[0m", s)
} }
func AnsiRed(s string) string {
return fmt.Sprintf("\x1b[31m%s\x1b[0m", s)
}
func RenderPuzzle(puzzle []rune, width, height int, selectedClueCells []int, selectedCell int) string { func RenderPuzzle(puzzle []rune, width, height int, selectedClueCells []int, selectedCell int) string {
b := strings.Builder{} b := strings.Builder{}