Implementation of nim strategy game.