Control buttons have been added.
States computed only when there is no winning possition.

Speed up from 800ms to 400ms on my machine.