function variant of the game