aboutsummaryrefslogtreecommitdiff
path: root/internal/game/hacking/mastermind.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-27 16:50:41 -0400
committerhistoria <[not public]>2026-06-27 16:50:41 -0400
commit988b006a5bb9edb6465653566e7bdf8175347b8c (patch)
tree3a1fceff2ee80c11b5dafcc49c13ababe021e880 /internal/game/hacking/mastermind.go
parent1cab9ca20e24742f770a676f84e4ed9f1636f297 (diff)
downloadthehouseoficarus-988b006a5bb9edb6465653566e7bdf8175347b8c.tar.gz
feat: one-way map links, blocked paths on map, map grid startup validation, user colors for maps
Diffstat (limited to 'internal/game/hacking/mastermind.go')
-rw-r--r--internal/game/hacking/mastermind.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/game/hacking/mastermind.go b/internal/game/hacking/mastermind.go
index 8d4eb1c..9a20907 100644
--- a/internal/game/hacking/mastermind.go
+++ b/internal/game/hacking/mastermind.go
@@ -45,8 +45,8 @@ func (m *MastermindGame) Init(level int) string {
sb.WriteString("No symbol repeats. You have 10 attempts to crack the code.\n")
sb.WriteString("\n")
sb.WriteString("After each guess, you'll see:\n")
- sb.WriteString(" {40}[X]{/} = correct symbol in correct position\n")
- sb.WriteString(" {226}[O]{/} = correct symbol in wrong position\n")
+ sb.WriteString(" {28}[X]{/} = correct symbol in correct position\n")
+ sb.WriteString(" {E2}[O]{/} = correct symbol in wrong position\n")
sb.WriteString(" [ ] = symbol not in code\n")
sb.WriteString("\n")
sb.WriteString("Commands:\n")
@@ -108,11 +108,11 @@ func (m *MastermindGame) HandleInput(input string) (string, bool, bool) {
for i, d := range guess {
match := "[ ]"
if guess[i] == m.code[i] {
- match = "{40}[X]{/}"
+ match = "{28}[X]{/}"
} else {
for j := 0; j < 4; j++ {
if guess[i] == m.code[j] {
- match = "{226}[O]{/}"
+ match = "{E2}[O]{/}"
break
}
}
@@ -150,7 +150,7 @@ func (m *MastermindGame) doStatus() string {
for j, d := range g.Digits {
match := "[ ]"
if g.Digits[j] == m.code[j] {
- match = "{40}[X]{/}"
+ match = "{28}[X]{/}"
} else {
found := false
for k := 0; k < 4; k++ {
@@ -160,7 +160,7 @@ func (m *MastermindGame) doStatus() string {
}
}
if found {
- match = "{226}[O]{/}"
+ match = "{E2}[O]{/}"
}
}
_ = d