pacai.pacman.game

 1import random
 2
 3import pacai.core.agentinfo
 4import pacai.core.board
 5import pacai.core.game
 6import pacai.core.gamestate
 7import pacai.pacman.gamestate
 8
 9class Game(pacai.core.game.Game):
10    """
11    A game following the standard rules of Pac-Man.
12    """
13
14    def get_initial_state(self,
15            rng: random.Random,
16            board: pacai.core.board.Board,
17            agent_infos: dict[int, pacai.core.agentinfo.AgentInfo]) -> pacai.core.gamestate.GameState:
18        return pacai.pacman.gamestate.GameState(board = board, agent_infos = agent_infos)
class Game(pacai.core.game.Game):
10class Game(pacai.core.game.Game):
11    """
12    A game following the standard rules of Pac-Man.
13    """
14
15    def get_initial_state(self,
16            rng: random.Random,
17            board: pacai.core.board.Board,
18            agent_infos: dict[int, pacai.core.agentinfo.AgentInfo]) -> pacai.core.gamestate.GameState:
19        return pacai.pacman.gamestate.GameState(board = board, agent_infos = agent_infos)

A game following the standard rules of Pac-Man.

def get_initial_state( self, rng: random.Random, board: pacai.core.board.Board, agent_infos: dict[int, pacai.core.agentinfo.AgentInfo]) -> pacai.core.gamestate.GameState:
15    def get_initial_state(self,
16            rng: random.Random,
17            board: pacai.core.board.Board,
18            agent_infos: dict[int, pacai.core.agentinfo.AgentInfo]) -> pacai.core.gamestate.GameState:
19        return pacai.pacman.gamestate.GameState(board = board, agent_infos = agent_infos)

Create the initial state for this game.