Exemple #1
0
def attacker_would_surf(game: g.Game, attacker: m.Player, defender: m.Player) -> bool:
    if (defender.has_skill(t.Skill.SIDE_STEP) and not attacker.has_skill(t.Skill.GRAB)) or defender.has_skill(t.Skill.STAND_FIRM):
        return False

    if not attacker.position.is_adjacent(defender.position):
        return False

    return direct_surf_squares(game, attacker.position, defender.position)
Exemple #2
0
def in_scoring_range(game: g.Game, player: m.Player) -> bool:
    return player.move_allowed() >= distance_to_scoring_endzone(
        game, player.team, player.position)
Exemple #3
0
    def __init__(self, unit: m.Player):

        self.unit: m.Player = unit
        self.move_allowed: int = unit.move_allowed()
Exemple #4
0
def in_scoring_range(game: g.Game, player: m.Player) -> bool:
    return player.num_moves_left() >= distance_to_scoring_endzone(game, player.team, player.position)
Exemple #5
0
    def __init__(self, unit: m.Player):

        self.unit: m.Player = unit
        self.move_allowed: int = unit.num_moves_left()
Exemple #6
0
 def __init__(self, player: Player, allow_skill_reroll=True):
     self.allow_skill_reroll = allow_skill_reroll
     self.player: Player = player
     self.move_allowed: int = player.num_moves_left()
     self.cur_depth = 0