Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Flippchen committed Dec 11, 2022
2 parents 514d2f0 + 194c49b commit 356cc26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions game/src/machines/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ impl Machine {
self.time_remaining = 0;

if self.last_trade.return_after_timer {
// handel edge case for wining the game
if self.last_trade.name == "Notfall_signal_absetzen" {
return Ok(self.sender.as_ref().unwrap().send(GameCommand::Winning)?);
}
self.change_state_to(&self.last_trade.initial_state.clone());
} else {
self.change_state_to(&self.last_trade.resulting_state.clone());
Expand All @@ -286,10 +290,6 @@ impl Machine {
.unwrap()
.send(GameCommand::AddItems(items))?;
}
// handel edge case for wining the game
if self.last_trade.name == "Notfall_signal_absetzen" {
return Ok(self.sender.as_ref().unwrap().send(GameCommand::Winning)?);
}
Ok(())
}

Expand Down

0 comments on commit 356cc26

Please sign in to comment.