The Game service documentations suggests that sending a start game request while the game is already running, 'nothing will happen'. Doing so ended the simulation. It created a panic with the following message:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: AlreadyInState', game\src\systems\change_app_state.rs:15:47
It looks like the offending line sets the state without checking whether it matches. I would think that a mutable variable could handle being set to the same state, but that does not seem to be the case.
I intend to change the logic such that my client does not try to start the game while it is running. But, it is still appropriate to either change the documentation or resolving the command robustly.
The Game service documentations suggests that sending a start game request while the game is already running, 'nothing will happen'. Doing so ended the simulation. It created a panic with the following message:
It looks like the offending line sets the state without checking whether it matches. I would think that a mutable variable could handle being set to the same state, but that does not seem to be the case.
I intend to change the logic such that my client does not try to start the game while it is running. But, it is still appropriate to either change the documentation or resolving the command robustly.