Skip to main content

Module game

Module game 

Source

Enums§

WinStatus

Functions§

check_winner
Determine winner. The last player to move (the one with more pieces on the board) is credited with the win.
current_player
Whose turn is it? Player 0 moves first; after that they alternate. Returns None if the piece counts are inconsistent.
has_winning_line
Check whether any win line contains all 4 distinct shapes (regardless of color).
is_game_over