Skip to content

Samuel29590/MolRandomPrinterTimeTravel

Repository files navigation

MolRandomPrinterTimeTravel

Installing MolAntsTimeTravel

Metacello new
        baseline: 'MolRandomPrinterTimeTravel';
        repository: 'github://Samuel29590/MolRandomPrinterTimeTravel';
        load.

Documentation

Start and stop the example like this :

image

The example is simple the component MolRandomSender produce one event each time we click on the button Print random integer smaller than 100. And the MolRandomReceiver consume that event and print a random integer between 1 and 99.

Illustration :

image

Code of the event :

image

The Time travel start with 4 step ( step 0 : init ( so nothing in it ), step 1 : creation of the sender, step 3 : creation of the receiver, step 4 : the current step).

And each time we click on the button the time travel save the event on a new empty step. So we can replay the execution event by event.

(Each component is a Bloc object BlElement or BlTextElement their implementation and initialization as Bloc object isn't important, we focus on time travel and event recording)

⚠️ The problem :

When we time travel, because it's a random integer that the receiver print, the execution is always different even if it's the same conditions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published