summaryrefslogtreecommitdiff
path: root/src/shooting.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2017-06-18 15:15:11 +0200
committerJustin Worthe <justin.worthe@gmail.com>2017-06-18 15:15:11 +0200
commit862897ea1d183810c2783eaeeaf40f648ef3dc2d (patch)
treefb168f1122fa2839b52443c54555593045262a2a /src/shooting.rs
parent29181fce4797b6e4833ab56d1fa7ff9fa865965b (diff)
Added knowledge of weapons
Next step: knowledge of weapon's effects.
Diffstat (limited to 'src/shooting.rs')
-rw-r--r--src/shooting.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shooting.rs b/src/shooting.rs
index 4d87d86..bcdf783 100644
--- a/src/shooting.rs
+++ b/src/shooting.rs
@@ -4,6 +4,7 @@ use rand::distributions::{IndependentSample, Range};
use actions::*;
use math::*;
use knowledge::*;
+use ships::*;
pub fn shoot_smartly(knowledge: &Knowledge) -> Action {
let shot = if knowledge.has_unknown_hits() {
@@ -12,8 +13,9 @@ pub fn shoot_smartly(knowledge: &Knowledge) -> Action {
else {
seek_shoot(&knowledge)
};
-
- Action::Shoot(shot)
+
+ //TODO shoot other weapons
+ Action::Shoot(Weapon::SingleShot, shot)
}
fn seek_shoot(knowledge: &Knowledge) -> Point {