Created
November 13, 2015 17:28
-
-
Save anonymous/f6bc466ad0c610fb2248 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gamebot import GameBot | |
class Bot(GameBot): | |
# Possible directions where a unit can move to | |
# self.NW, self.N, self.NE, self.E, self.SE, self.S, self.SW, self.W | |
# game_map : Is a python dictionary: | |
# - key = (x, y) that indicates a coordinate. x and y are integers. | |
# - value = a Tile object. | |
# Tile object attributes: | |
# own_hq: Boolean. Indicates that this tile is our own base | |
# enemies_count: Integer. Indicate the amount of enemies in the tile | |
# enemy_hq: Boolean. Indicates that the enemy HQ is present in the tile. | |
# units: list of units objects currently on that tile. | |
# reachable: boolean. Indicates that this tile is not a blocker. | |
# x: integer. The x coordinate | |
# y: integer. The y coordinate | |
# Unit Object attributes: | |
# x, y: integers. Analog to the x, y attributes in Tile object. | |
# unit_id: integer: Indicates the id of the unit. | |
# Usefull methods: | |
# self.attack(tile, direction): Attack from one tile in a certain | |
# direction. The direction must be one of the possible defined above. | |
# self.move(unit, direction): Move a unit from its current | |
# position in a certain direction. The direction must be one of the | |
# possible defined above. IE: self.move(unit_id, self.N) | |
def play(self, player_id, game_map): | |
""" | |
Method were the player can develop its strategy using the player_id | |
and the game_map as input. | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment