Safely Sending Signals (Part 1)

Got here from @jbobrow’s topic.

If I understand the algorithm, it seems like there is still a race condition.

Say I have two adjacent tiles A & B, both in INERT. Clicking A will send it to GO and send the signal to cause B to enter GO.

As soon as tile B enters GO it will send back the signal, which might cause A to move on to RESOLVE. But tile B might still be waiting for its other neighbors to enter GO.

If tile A enters RESOLVE fast enough, it will no longer be in GO and tile B will be stuck. Tile B is waiting for all of its neighbors to be in GO, but tile A has already moved on to RESOLVE.

This may never happen in practice, of course.