Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Starting a running game killed it #211

@Nzen

Description

@Nzen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugReport a new bugL-rustTag the Rust ecosystem

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions