state logic for the game 'Ingenious'