updated game logic, firebase deployable