Nim

Take turns taking stones from one heap: as many as you like. Take the last stone and you win (or lose, if you pick that in Settings).

✋ Take

On your turn, take one or more stones from one heap. Tap a stone: it goes, and so does every stone above it in that heap. Press and slide to see what you would take before you lift.

🏆 Winning

Take the last stone and you win. In âš™ī¸ Settings you can play the other way round: whoever takes the last stone loses.

✨ The trick

Every heap is drawn in groups of 4, 2 and 1 (a heap of 7 is 4 + 2 + 1, a heap of 5 is 4 + 1). Count the groups of each size across all the heaps. If every size comes in pairs, the player who just took is winning. So on your turn, take so that every size pairs up. How: find the biggest size that does not pair, pick a heap that has a group of that size, and take from it until the sizes in it make every size pair up. The coach (in âš™ī¸ Settings) shows you the take.

🙃 Last to take loses

Play the trick the same way until only one heap has more than one stone. Then take so that an odd number of single stones is left: the other player has to take the last one. With only single stones left, every take is one stone, so an odd number left to the other player wins.

🤖 The computer

đŸŖ Easy takes any stones. 🙂 Medium knows how heaps end. 🧠 Hard knows the trick, and never misses a win.

âŒ¨ī¸ Keys

On the heaps, left and right move between heaps, up and down along a heap, and Enter or Space takes the marked stones. Escape lets go.

🏁 Last to take

Who wins when the last stone goes: the player who takes it, or the other one. A new game plays it this way.

✨ Coach

The coach marks the stones to take with ✨ and says why: it counts the groups of 4, 2 and 1 and shows which pair up (✓). It is on until you turn it off.

🏅 Against the computer

🔄 Start over

Clears your wins and losses against the computer on this device, and the saved game. Your emojis and settings stay as they are.