jonathanGB/faulty-robots-simulation

Handle "generate"

Closed this issue · 3 comments

  • Only enable when there is >= 2 robots
  • On click, disable event listeners on "setup" robots
    • keep listeners on double click
    • make top inputs & textarea disabled (change css cursor on disabled too?)
  • display generation "001"
    • pre-generate 10 generations in advance using the webworker?
    • show icon on the side to generate next "wave"?

Now computes differents generations (by default 10), next things is to display the results and handle the concurrency (we may request a generation that is not available and done in another thread)

Last commit implements an async "fetch" method to get the next generation state; based on this, we can eventually update the UI every generation with a single call to get the data and change our state.

done