frame.setPreferredSize(new Dimension(1200, 900));
frame.getContentPane().add(theVisual);
frame.pack();
frame.setVisible(true);
StateMachine theMachine = new CachedStateMachine(new ProverStateMachine());
theMachine.initialize(theGame.getRules());
try {
MachineState theCurrentState = theMachine.getInitialState();
do {
theVisual.observe(new ServerNewGameStateEvent(theCurrentState));
theCurrentState = theMachine.getRandomNextState(theCurrentState);
Thread.sleep(250);
System.out.println("State: " + theCurrentState);
} while(!theMachine.isTerminal(theCurrentState));
theVisual.observe(new ServerNewGameStateEvent(theCurrentState));
} catch (Exception e) {
e.printStackTrace();
}
}