class documentation

class TicTacToe:

View In Hierarchy

Management of a Tic-Tac-Toe game (does not do strategy).

Method __init__ Start a new game.
Method __str__ Return string representation of current game board.
Method mark Put an X or O mark at position (i,j) for next player's turn.
Method winner Return mark of winning player, or None to indicate a tie.
Method _is_win Check whether the board configuration is a win for the given player.
Instance Variable _board Undocumented
Instance Variable _player Undocumented
def __init__(self):

Start a new game.

def __str__(self):

Return string representation of current game board.

def mark(self, i, j):

Put an X or O mark at position (i,j) for next player's turn.

def winner(self):

Return mark of winning player, or None to indicate a tie.

def _is_win(self, mark):

Check whether the board configuration is a win for the given player.

_board =

Undocumented

_player: str =

Undocumented