diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2017-05-20 22:20:47 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2017-05-20 22:20:47 +0200 |
commit | 6b8c71c635539a8609f82aa6eb52ea56c2c41c0c (patch) | |
tree | 23da0d8ae0d15ebc1e9b48797965f58958e9c34d /src/lib.rs | |
parent | 973f7be695f7c3308d384e1ee30066547e4a07c7 (diff) |
Finished up efficient elimination of found ships
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -60,7 +60,7 @@ fn placement(map_size: u16) -> (Action, Knowledge) { fn shoot(state: &State) -> Result<(Action, Knowledge), String> { let old_knowledge = read_knowledge()?; let knowledge = old_knowledge.resolve_last_action(&state); - let action = shoot_randomly(&state); + let action = shoot_smartly(&knowledge); Ok((action.clone(), knowledge.with_action(action))) } |