Skip to content

[Bug]: Empty algorithm state breaks session import #10

@Ijee

Description

@Ijee

What happened?

This happens on the binary tree algorithm as it is the only algorithm that currently works without any state needed for the whole import and export ordeal. In the AlgorithmService there is an if clause in the updateState() function that gets triggered if this happens.
Before this update this case only happened when the user goes back to iteration 0 which then creates a new algorithm to properly reset the algorithm state.

This is still an issue but got temporarily fixed by re-adding an unusued state that gets added to the export string in the algorithm code.

Reproduction steps

  1. Select the Binary Tree algorithm
  2. Run it for a few iterations
  3. Export the state
  4. Import the algorithm state with the export string
  5. An error occurs once you resume play

Version

1.3.0

What browser did you use?

Chrome, Firefox

Screenshots (optional)

No response

Console Logs (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions