public void enterState ( int id , Transition leave , Transition enter ) { if ( leave == null ) { leave = new EmptyTransition ( ) ; } if ( enter == null ) { enter = new EmptyTransition ( ) ; } leaveTransition = leave ; enterTransition = enter ; nextState = getState ( id ) ; if ( nextState == null ) { throw new RuntimeException ( "No game state registered with the ID: " + id ) ; } leaveTransition . init ( currentState , nextState ) ; }
Enter a particular game state with the transitions provided