Answer: Finite automata

Question: What is the finite state automaton for the GameChannel class of Assignment 5? The automaton has 6 states.

It can receive 8 possible signals.
  1. openConnection() called
  2. gameStatus() called
  3. receiveMove() called
  4. sendMove() called
  5. TIMEOUT received from server
  6. opponent's move received from server
  7. final game status received from server
  8. I_AM_X received from server
  9. I_AM_O received from server
Don't worry about the outputs.

Answer: The start state is CHANNEL_CLOSED. The notion of accepting state doesn't apply here. I've placed dashes in many places where behavior would not need to be defined.

            input
state  1 2 3 4 5 6 7 8 9
  A    B - - - - - - - -
  B    - - - - - - A E C
  C    - A E - - D A - -
  D    - A E - - - A - -
  E    - A - C F - A - -
  F    - A - C - - A - -


Answer / Finite automata / Review questions / 15-211 A, B