diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2017-06-18 15:15:11 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2017-06-18 15:15:11 +0200 |
commit | 862897ea1d183810c2783eaeeaf40f648ef3dc2d (patch) | |
tree | fb168f1122fa2839b52443c54555593045262a2a /src/shooting.rs | |
parent | 29181fce4797b6e4833ab56d1fa7ff9fa865965b (diff) |
Added knowledge of weapons
Next step: knowledge of weapon's effects.
Diffstat (limited to 'src/shooting.rs')
-rw-r--r-- | src/shooting.rs | 6 |
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 { |