Types¶
These are the modules in the othello.game subpackage that deal with types.
othello.game.player¶
Player module.
othello.game.disc¶
Disc module.
-
class
othello.game.disc.
Disc
¶ Disc object.
-
othello.game.disc.
get_disc
(player=None)¶ Returns Disc object based on given player.
Returns the Disc object corresponding to the player color if a Player type is passed, or a blank Disc if no argument is passed.
othello.game.point¶
Point module.
othello.game.move¶
Move module.
-
exception
othello.game.move.
InvalidMoveError
¶ Raised upon invalid Move object initialization.
-
class
othello.game.move.
Move
(point=None, is_pass=False, is_resign=False)¶ Represents a player’s move.
Should be instantiated with one of the defined alternative constructors.
-
point
¶ Point to play if move is play, otherwise None.
-
is_play
¶ A boolean indicating if the move is play disc.
-
is_pass
¶ A boolean indicating if the move is pass.
-
is_resign
¶ A boolean indicating if the move is resign.
-
classmethod
pass_turn
()¶ Constructor for pass type Move.
- Return type
- Returns
A pass type Move instance.
-
classmethod
play
(point)¶ Constructor for play type Move.
-