diff options
| author | metamuffin <metamuffin@disroot.org> | 2024-07-20 19:29:41 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-07-20 19:29:41 +0200 | 
| commit | 1a45b0e0f5de785ddf268d7371f0cdaeafe9daa7 (patch) | |
| tree | 5712d2d0784da660733e41d1b69636127b71c3b3 /server/src/entity/customers | |
| parent | 89ba8a6b62b90ac72547e2ca9ea5eeae7bbc6500 (diff) | |
| download | hurrycurry-1a45b0e0f5de785ddf268d7371f0cdaeafe9daa7.tar hurrycurry-1a45b0e0f5de785ddf268d7371f0cdaeafe9daa7.tar.bz2 hurrycurry-1a45b0e0f5de785ddf268d7371f0cdaeafe9daa7.tar.zst | |
refactor score code (and break things)
Diffstat (limited to 'server/src/entity/customers')
| -rw-r--r-- | server/src/entity/customers/mod.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/server/src/entity/customers/mod.rs b/server/src/entity/customers/mod.rs index 7a8280bc..e8679dc9 100644 --- a/server/src/entity/customers/mod.rs +++ b/server/src/entity/customers/mod.rs @@ -151,8 +151,8 @@ impl EntityT for Customers {                          )                          .expect("no path to exit");                          *self.chairs.get_mut(chair).unwrap() = true; -                        game.demands_failed += 1; -                        game.points -= 1; +                        game.score.demands_failed += 1; +                        game.score.points -= 1;                          game.score_changed = true;                          info!("{id:?} -> exiting");                          *state = CustomerState::Exiting { path } @@ -232,8 +232,8 @@ impl EntityT for Customers {                          )                          .ok_or(anyhow!("no path to exit"))?;                          *self.chairs.get_mut(chair).unwrap() = true; -                        game.demands_completed += 1; -                        game.points += demand.points; +                        game.score.demands_completed += 1; +                        game.score.points += demand.points;                          game.score_changed = true;                          info!("{id:?} -> exiting");                          *state = CustomerState::Exiting { path } | 
