Nim Sticks
The ancient take-away game: remove sticks from one row per turn - take the last (or avoid it in misere).
Board Emulator verified v1.0.0 17.2 KB
The JAR and JAD are the Original Java ME Version for phones and emulators. How to install.
About
Rows of matchsticks, two players, one rule: take any number of sticks from a single row. Normal play rewards taking the final stick; misere play punishes it. The standard CPU blunders now and then, while the Expert CPU plays the mathematically perfect nim-sum strategy - you can still win, but only from a winning position and without a single slip. Boards are the classic 1-3-5-7 or randomly dealt.
Objective: Normal: take the last stick. Misere: force the CPU to take it.
Modes: Normal vs CPU, Misere vs CPU, Normal vs Expert, Misere vs Expert
board game math strategy nim



Screenshots captured from the real JAR at 176x208 on the project's reference runtime; the third image is rendered by MicroEmulator 2.0.4.
Controls
| Key | Action |
|---|---|
| 2/8 | Choose row |
| 4/6 | Choose how many |
| 5 | Take sticks |
| * | Pause menu |
In every game: 5 selects in menus, * pauses, and on the title screen # opens help and 0 toggles sound. The joystick and 2/4/6/8 are interchangeable.
Verification
| Level | Status | Details |
|---|---|---|
| Build verified | Yes | Compiled against CLDC 1.0 / MIDP 2.0; JAR + JAD generated |
| Reference runtime | Yes | Passed at 128x128, 128x160, 176x208, 176x220, 240x320 |
| Emulator verified | Yes | Automated smoke test on MicroEmulator 2.0.4 (176x220) |
| Real device verified | No | Not yet tested on real hardware |
Tried it on a real phone? Send a device report.
Technical details
| MIDlet | nimsticks.NimSticksMIDlet |
|---|---|
| Platform | Java ME, CLDC 1.0, MIDP 2.0 |
| JAR size | 17.2 KB |
| Screens | 128x128, 128x160, 176x208, 176x220, 240x320 |
| Storage | RMS record store gk (settings, best score) |