Implemented basic game logic