Skip to content

(Bug) overrideGameState() doesn't update move dispatchers #1178

@davjhan

Description

@davjhan

I'm using overrideGameState() to load a game from a specific saved state for testing, loading etc. This is SPA client only game, so no state is stored outside of the browser.

Ideally this is as simple as:

client.overrideGameState(savedState)

However, internally this does not seem to call createDispatchers, because the client does not let me make a move that is only on a specific state. Insteead I get "ERROR: disallowed move: continue(my movecontinue`) is only on the phase I load not the intial phase.

This makes overrideGameState unusable if using phases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions