コード例 #1
0
 internal IState GetSoldState()
 {
     _soldState.Dispense();
     if (_state != _soldOutState)
     {
         return(_noQuarterState);
     }
     return(_soldOutState);
 }
コード例 #2
0
 public void TurnCrank()
 {
     _state.TurnCrank();
     _state.Dispense();
 }
コード例 #3
0
 internal IState GetWinnerState()
 {
     _winnerState.Dispense();
     return(_state);
 }
コード例 #4
0
 public void Dispense()
 {
     _state.Dispense();
 }