aboutsummaryrefslogtreecommitdiff
path: root/planetwars-rules/src/rules.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2021-12-21 21:47:48 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2021-12-21 21:47:48 +0100
commit218ebc3b8f5024a0813f8378b83d91dbb9aa7db2 (patch)
tree4ce205ae721fd0696ec16ea8b8b7f46bfeb36787 /planetwars-rules/src/rules.rs
parentb7ab700a57fb1155d4824f24fe9cc55111c977fe (diff)
downloadplanetwars.dev-218ebc3b8f5024a0813f8378b83d91dbb9aa7db2.tar.xz
planetwars.dev-218ebc3b8f5024a0813f8378b83d91dbb9aa7db2.zip
cargo fmt
Diffstat (limited to 'planetwars-rules/src/rules.rs')
-rw-r--r--planetwars-rules/src/rules.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/planetwars-rules/src/rules.rs b/planetwars-rules/src/rules.rs
index 7c13e58..587098f 100644
--- a/planetwars-rules/src/rules.rs
+++ b/planetwars-rules/src/rules.rs
@@ -50,8 +50,7 @@ pub struct Dispatch {
impl PwState {
pub fn dispatch(&mut self, dispatch: &Dispatch) {
- let distance = self.planets[dispatch.origin]
- .distance(&self.planets[dispatch.target]);
+ let distance = self.planets[dispatch.origin].distance(&self.planets[dispatch.target]);
let origin = &mut self.planets[dispatch.origin];
origin.fleets[0].ship_count -= dispatch.ship_count;