BaseEnv#
Make Env#
Todo
Add API Documentation for make_env() function.
BaseEnv Class#
Environment Options#
- class pz_battlesnake.types.battlesnake_options.BattlesnakeOptions(width: int = 11, height: int = 11, game_map: str = 'standard', game_type: str = 'solo', seed: Optional[int] = None, names: Optional[List[str]] = None, colors: List[str] = ['#00FF00', '#0000FF', '#FF00FF', '#FFFF00'])[source]#
BattlesnakeOptions represents the options for a battlesnake game.
- Parameters:
width (int, optional) – width of the board. Defaults to 11.
height (int, optional) – height of the board. Defaults to 11.
map (str, optional) – name of the map. Defaults to “standard”.
game_type (str, optional) – game type. Defaults to “solo”.
seed (int, optional) – the seed to use. Defaults to None.
names (List[str], optional) – list over all names. Defaults to None.
colors (List[str], optional) – list of all colors. Defaults to DEFAULT_COLORS.
Example
>>> from pz_battlesnake.types.battlesnake_options import BattlesnakeOptions >>> options = BattlesnakeOptions(game_map="standard", game_type="solo") >>> print(options) BattlesnakeOptions(width=11, height=11, game_map=standard, game_type=solo, seed=None, names=None, colors=['#00FF00', '#0000FF', '#FF00FF', '#FFFF00'])
- property options: Dict[str, Any]#
Returns Battlesnake Options as a dictionary
- Returns:
Dict[str, Any] – returns a dictionary of the options
Example
>>> from pz_battlesnake.types.battlesnake_options import BattlesnakeOptions >>> options = BattlesnakeOptions(game_map="standard", game_type="solo") >>> print(options.options) { 'width': 11, 'height': 11, 'map': 'standard', 'game_type': 'solo', 'seed': None, 'names': None, 'colors': ['#00FF00', '#0000FF', '#FF00FF', '#FFFF00'] }