Implemented game logic