rust/lib-hwengine-future/src/ai/attack_tests.rs
author unC0Rr
Mon, 03 Feb 2025 15:25:28 +0100
changeset 16111 669cdf697f16
parent 16082 85d7d6b71087
permissions -rw-r--r--
Simplify 'for' loop by keeping more information about iterator

use crate::ai::ammo::AmmoType;
use crate::ai::Target;
use crate::GameField;

fn analyze_grenade(game_field: &GameField, targets: &[Target], my_x: f32, my_y: f32) {}

impl AmmoType {
    pub(crate) fn analyze_attacks(
        &self,
        game_field: &GameField,
        targets: &[Target],
        my_x: f32,
        my_y: f32,
    ) {
        match self {
            AmmoType::Grenade => analyze_grenade(game_field, targets, my_x, my_y),
            _ => {}
        }
    }
}