Game 5 Unit 23 of 128 1 hr learning time
Board Size Variation
Implement 6×6 board option for quicker games and strategic variety.
18% of Ink War
Board size affects game length and strategy. A 6×6 board (36 cells) creates faster games than 8×8 (64 cells).
Run It
pasmonext --sna inkwar.asm inkwar.sna

Version shows “PHASE 2 V0.7”.
Variable Board Size
Key changes needed:
| Component | Adjustment |
|---|---|
| Drawing | Different board dimensions |
| Boundaries | Cursor limits change |
| Win detection | Total cells changes (36 vs 64) |
| AI logic | Adjacency calculations adjust |
Implementation Approach
Use a board_size variable:
board_size: defb 8 ; 6 or 8
; Use throughout code:
ld a, (board_size)
ld b, a ; Loop counter for rows/cols
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
- Parameterised drawing - Flexible board dimensions
- Variable bounds checking - Dynamic cursor limits
- Game variants - Simple options add replay value
What’s Next
Unit 24 adds an optional move timer for faster-paced games.
What Changed
Unit 22 → Unit 23