static void Main(string[] args) { Console.WriteLine("Hello World!"); MarioStateMachine mario = new MarioStateMachine(); mario.obtainMushRoom(); int score = mario.getScore(); StateEnum state = mario.getCurrentState(); Console.WriteLine("mario score: " + score + "; state: " + state); mario.obtainCape(); int score2 = mario.getScore(); StateEnum state2 = mario.getCurrentState(); Console.WriteLine("mario score: " + score2 + "; state: " + state2); Console.ReadKey(); }
public SuperMario(MarioStateMachine stateMachine) { this.stateMachine = stateMachine; }
public FireMario(MarioStateMachine stateMachine) { this.stateMachine = stateMachine; }
public SmallMario(MarioStateMachine stateMachine) { this.stateMachine = stateMachine; }
public CapeMario(MarioStateMachine stateMachine) { this.stateMachine = stateMachine; }