Wrote some game logic