Game 5 Unit 28 of 128 1 hr learning time
Practice Mode
Add practice mode with undo functionality for learning and experimentation.
22% of Ink War
Practice mode lets players experiment without consequences—perfect for learning strategy.
Run It
pasmonext --sna inkwar.asm inkwar.sna

Version shows “PHASE 2 V0.12”.
Undo Implementation
Store the previous state before each move:
undo_row: defb 0
undo_col: defb 0
undo_player: defb 0
undo_available: defb 0
; Before claiming:
call save_undo_state
; On U key:
call restore_undo_state
Design Decisions
| Choice | Rationale |
|---|---|
| One level undo | Simple to implement |
| Two-player only | AI shouldn’t be undone |
| Visual feedback | Flash on undo |
| Key ‘U’ | Intuitive |
The Complete Code
This code sample could not be loaded. The file may be missing or the path may be incorrect.
What You’ve Learnt
- State history - Storing previous game state
- Undo mechanics - Restoring state on demand
- Learning aids - Helping new players improve
What’s Next
Unit 29 adds configurable control schemes.
What Changed
Unit 27 → Unit 28