# The game of Nim (Level 1)

Nim is a two-player game that is played with piles of stones (or markers).

In Level 1 of Nim, the game begins with two piles of stones (how many stones in each pile is arbitrary, and will be chosen at random for each game).

Players alternate taking turns, where a "turn" consists of taking some or all of the stones from one of the piles. For example, if there were 5 stones in the first pile and 12 in the second pile, then a player could take 1, 2, 3, 4, or 5 stones from the first pile, or 1, 2, ... , or 12 stones from the second pile. You can't take from both piles in the same turn, and you must take at least one stone from one of the piles on your turn.

The winner of the game is the player who plays last -- in other words, when there are no stones left, the player who played last is the winner. (This means that it's a bad idea to take all the stones in one pile and leave the other pile for the other player!).

You'll be playing against the computer, so keep your wits sharp!