basic game logic fully completed