boolean logic for the game