functions for the Automata Game