Finished basic game logic