Second  algo for the game