/* stateTest.c */

#include "state.c"


int main() {
  int i;
  State red, green, yellow, blue;
  int stateIndices[] = {0, 0, 1, 1, 0, 1, 0, 0, 0};

  initState(&red, "red");
  initState(&green, "green");
  initState(&yellow, "yellow");
  initState(&blue, "blue");

  connectStates(&yellow, &red);
  connectStates(&yellow, &blue);
  connectStates(&red, &yellow);
  connectStates(&green, &yellow);
  connectStates(&blue, &green);
  connectStates(&blue, &red);

  visitStates(&yellow, stateIndices, 9, printStateName);
  visitStates(&yellow, stateIndices, 9, printStateNameBetweenStars);

  return 0;
}
