// Enforce state reqs for this Player
if( currentState == Unrealized ||
currentState == Realizing )
{
throw new NotRealizedError(
"Cannot add Controller to an Unrealized Player");
}
// Enforce state reqs for this Player
if(currentState == Started) {
throw new ClockStartedError(
"Cannot add Controller to a Started Player");
}
int controllerState = newController.getState();
// Enforce state reqs for new controller
if( controllerState == Unrealized ||
controllerState == Realizing )
{
throw new NotRealizedError(
"Cannot add Unrealized Controller to a Player");
}
// Enforce state reqs for this Player
if(controllerState == Started) {