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)
def in_scoring_range(game: g.Game, player: m.Player) -> bool: return player.move_allowed() >= distance_to_scoring_endzone( game, player.team, player.position)
def __init__(self, unit: m.Player): self.unit: m.Player = unit self.move_allowed: int = unit.move_allowed()
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)
def __init__(self, unit: m.Player): self.unit: m.Player = unit self.move_allowed: int = unit.num_moves_left()
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