Tried to understand the game logic