basic game logic finished