More game logic functions.