public Car() { EmptyTank = new EmptyTankState(this); FullTank = new FullTankState(this); EngineStarted = new EngineStartedState(this); DrivingState = new DrivingState(this); _currentState = EmptyTank; Gasoline = 0; }
public Car() { Fuel = 0; EmptyTank = new EmptyTankState(this); TankWithFuel = new TankWithFuelState(this); EngineStarted = new EngineStartedState(this); Driving = new DrivingState(this); _currentState = EmptyTank; }