public DangerGameState(SpaceShipContext ctx)
 {
     Console.WriteLine($"Your in the danger zone you only have {ctx.HitPoints} hit points");
     this.ctx = ctx;
 }
示例#2
0
 public LostGameState(SpaceShipContext ctx)
 {
     Console.WriteLine($"Game is lost!");
     this.ctx = ctx;
 }
 public WonGameState(SpaceShipContext ctx)
 {
     Console.WriteLine("You won the game!");
     this.ctx = ctx;
 }
示例#4
0
 public NewShip(SpaceShipContext context)
 {
     Console.WriteLine($"Welcome to stage: {ctx.currentStage} You have {ctx.HitPoints} hit points left");
     this.ctx = context;
 }