Пример #1
0
def valid_positions(me, things):
    return [
        position for position in adjacent_positions(me)
        if things.get(position) == None or (
            hasattr(things.get(position), "name")
            and things.get(position).name not in ["tree", "tower"])
    ]
Пример #2
0
    def noob_hero_logic(self, things, t):
        actions = 'move', 'attack', 'fireball', 'heal', 'stun'
        positions = adjacent_positions(self.position)

        return choice(actions), choice(positions)
Пример #3
0
def valid_positions(me, things):
    return [position for position in adjacent_positions(me)
     if (hasattr(things.get(position), "name") and things.get(position).name not in ["tree", "tower"]) or things.get(position) == None]    
Пример #4
0
    def noob_hero_logic(self, things, t):
        actions = 'move', 'attack', 'fireball', 'heal', 'stun'
        positions = adjacent_positions(self.position)

        return choice(actions), choice(positions)