dannyhammer / TwoPlayerGames

Undergraduate research into the mechanics of simple two-player games.
3 stars 2 forks source link

Players need a way to determine when they have no moves left #21

Closed dannyhammer closed 3 years ago

dannyhammer commented 3 years ago

A player's move function needs to return a set/stack/list of all possible moves. The player must submit a move by popping from the list (thus removing it from the list). If the Referee returns that the move was invalid, the player will submit another move. If the player runs out of valid moves (i.e. the set/stack/list is empty) it must notify the Referee that it has no valid moves.