Added some core game logic.