An implementation of the game Nim