public GameOfMeteors(ConsoleHardwareConfig config)
     : base(config) {
     World = new Composition(new byte[WorldSize * WorldSize / 8], WorldSize, WorldSize);
     World.Coinc += WorldCoinc;
     Ship = new PlayerMissile("ship", WorldSize / 2, WorldSize / 2, World);
     Ship.X = WorldSize / 2;
     Ship.Y = WorldSize / 2;
     Pruneau = new PlayerMissile {
         Name = "Pruneau",
         Owner = World,
         IsVisible = false
     };
     Meteors = new Meteor[NumberOfMeteors];
     for (var i = 0; i < NumberOfMeteors; i++) {
         Meteors[i] = new Meteor(this, i,
             new[] {0, WorldSize - 2, 0, WorldSize - 2} [i],
             new[] {0, 0, WorldSize - 2, WorldSize - 2} [i]);
     }
     DisplayDelay = 0;
 }
 public GameOfMeteors(ConsoleHardwareConfig config)
     : base(config)
 {
     World        = new Composition(new byte[WorldSize * WorldSize / 8], WorldSize, WorldSize);
     World.Coinc += WorldCoinc;
     Ship         = new PlayerMissile("ship", WorldSize / 2, WorldSize / 2, World);
     Ship.X       = WorldSize / 2;
     Ship.Y       = WorldSize / 2;
     Pruneau      = new PlayerMissile {
         Name      = "Pruneau",
         Owner     = World,
         IsVisible = false
     };
     Meteors = new Meteor[NumberOfMeteors];
     for (var i = 0; i < NumberOfMeteors; i++)
     {
         Meteors[i] = new Meteor(this, i,
                                 new[] { 0, WorldSize - 2, 0, WorldSize - 2 }[i],
                                 new[] { 0, 0, WorldSize - 2, WorldSize - 2 }[i]);
     }
     DisplayDelay = 0;
 }
Beispiel #3
0
 public GameOfMeteors(ConsoleHardwareConfig config) : base(config) {
     World = new Composition(new byte[WorldSize * WorldSize / 8], WorldSize, WorldSize);
     World.Coinc += WorldCoinc;
     Ship = new PlayerMissile {
         Name = "Ship",
         Owner = World,
         X = WorldSize/2,
         Y = WorldSize/2
     };
     Pruneau = new PlayerMissile {
         Name = "Pruneau",
         Owner = World,
         IsVisible = false
     };
     Meteors = new Meteor[WinningNumberOfMeteors];
     for (var i = 0; i < Meteors.Length; i++) {
         Meteors[i] = new Meteor(this, i);
     }
     NumberOfMeteors = StartingNumberOfMeteors;
     SpawnMeteors();
     DisplayDelay = 0;
 }
 public GameOfMeteors(ConsoleHardwareConfig config) : base(config) {
     World = new Composition(new byte[WorldSize * WorldSize / 8], WorldSize, WorldSize);
     World.Coinc += WorldCoinc;
     Ship = new PlayerMissile {
         Name = "Ship",
         Owner = World,
         X = WorldSize/2,
         Y = WorldSize/2
     };
     Pruneau = new PlayerMissile {
         Name = "Pruneau",
         Owner = World,
         IsVisible = false
     };
     Meteors = new Meteor[WinningNumberOfMeteors];
     for (var i = 0; i < Meteors.Length; i++) {
         Meteors[i] = new Meteor(this, i);
     }
     NumberOfMeteors = StartingNumberOfMeteors;
     SpawnMeteors();
     DisplayDelay = 0;
 }