rust/lib-hwengine-future/src/ai/attack_tests.rs
author unC0Rr
Tue, 31 Dec 2024 15:18:18 +0100
branchtransitional_engine
changeset 16082 85d7d6b71087
permissions -rw-r--r--
Add some more work on rust ai
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16082
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     1
use crate::ai::ammo::AmmoType;
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     2
use crate::ai::Target;
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     3
use crate::GameField;
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     4
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     5
fn analyze_grenade(game_field: &GameField, targets: &[Target], my_x: f32, my_y: f32) {}
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     6
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     7
impl AmmoType {
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     8
    pub(crate) fn analyze_attacks(
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
     9
        &self,
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    10
        game_field: &GameField,
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    11
        targets: &[Target],
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    12
        my_x: f32,
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    13
        my_y: f32,
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    14
    ) {
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    15
        match self {
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    16
            AmmoType::Grenade => analyze_grenade(game_field, targets, my_x, my_y),
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    17
            _ => {}
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    18
        }
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    19
    }
85d7d6b71087 Add some more work on rust ai
unC0Rr
parents:
diff changeset
    20
}