quoridor.game#
Game module.
Classes
|
Game object contains anything needed to play. |
- class quoridor.game.Game(game_name: str)#
Game object contains anything needed to play.
- __init__(game_name: str) None #
Initialise a game.
- Paramètres:
game_name – The name of the game.
- evaluate(choice: tuple[int, int, int])#
Coup is played, scored and unplayed.
- evaluate_all_choices()#
Score all choices with consistent order.
If the choice is not available, score is 0 :return: score vector of length 8*8*2 + 4.
- evaluate_all_possibilities()#
For a given board state, test all possibilities.
Score them for player i Sort them in ascending order
- Paramètres:
player_number – int
- Renvoie:
best possibilities, cost (increasing).
- play(choice: tuple[int, int, int]) None #
Make a move.
Update board_state if score return relative diff length between paths if get back is True, don’t change the board state.
- Paramètres:
choice
player_number – int
get_back – bool
score – bool
- Renvoie:
- score()#
Score for last player.