Added canUndo and canRedo implementation. Important for #7.
Upgraded state machine, added pause and many other. Addresses #7.
Further AI + State Machine integration. Finished full AI functionallity. #7