Game

class vindinium.models.Game(state)[source]

Bases: object

Represents a game.

A game object holds information about the game and is updated automatically by BaseBot.

id

int

the game id.

max_turns

int

maximum turns of the game (notice that each turn only a single hero moves).

turn

int

current turn.

map

vindinium.models.Map

a map instance.

heroes

list

a list of Hero instances.

mines

list

a list of Mine instances.

taverns

list

a list of Tavern instances.

__init__(state)[source]

Constructor.

Parameters:state (dict) – the state object.
update(state)[source]

Updates the game with new information.

Notice that, this function does not re-create the objects, just update the current objects with new information.

Parameters:state (dict) – the state object.