예제 #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
파일: noob.py 프로젝트: nueces/tota
    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
파일: nicoechaniz.py 프로젝트: fisadev/tota
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
파일: noob.py 프로젝트: nicoechaniz/tota
    def noob_hero_logic(self, things, t):
        actions = 'move', 'attack', 'fireball', 'heal', 'stun'
        positions = adjacent_positions(self.position)

        return choice(actions), choice(positions)