diff options
| author | historia <[not public]> | 2026-09-16 19:57:45 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-16 19:57:45 -0400 |
| commit | 6ef40a5739f1723ec26cc32dfc48fe764f776dca (patch) | |
| tree | e215a4dc96ea639bcea07bb589aae3e31c3609bb /internal/game/hacking/wumpus.go | |
| parent | 1dad15698845d370e998f7cc5feb8aece3fab58f (diff) | |
| download | thehouseoficarus-6ef40a5739f1723ec26cc32dfc48fe764f776dca.tar.gz | |
fix: durable payouts survive journal failure, cap bank withdrawals, hash passwords off the owner loop.
Diffstat (limited to 'internal/game/hacking/wumpus.go')
| -rw-r--r-- | internal/game/hacking/wumpus.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/game/hacking/wumpus.go b/internal/game/hacking/wumpus.go index 1f0a434..1d4b371 100644 --- a/internal/game/hacking/wumpus.go +++ b/internal/game/hacking/wumpus.go @@ -200,9 +200,12 @@ func (w *WumpusGame) checkRoom() (string, bool, bool) { if cur == i { sb.WriteString("ICE detected! You're relocated to a random node...\n") w.player = rand.Intn(20) - chained, _, _ := w.checkRoom() + // The chained check can terminate the game (landing on the + // rogue AI or a data trap): propagate its result instead of + // discarding the terminal state. + chained, done, won := w.checkRoom() sb.WriteString(chained) - return sb.String(), false, false + return sb.String(), done, won } } sb.WriteString(w.roomDesc()) |
