Helper methods for game logic.