Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if ((pseudoBox.Text != string.Empty) && (modeBox.Text != string.Empty) && (shipBox.Text != string.Empty))
     {
         this.pseudo = pseudoBox.Text;
         GameMode      mode = modeArray[(int)Enum.Parse(typeof(modeEnum), this.modeBox.Text)];
         ShipArguments ship = shipArray[(int)Enum.Parse(typeof(shipEnum), this.shipBox.Text)];
         this.configuration = new Configuration(mode, ship, new KeyBinding());
         this.Close();
     }
 }
Esempio n. 2
0
 public Configuration(GameMode gameMode, ShipArguments ship, KeyBinding keys)
 {
     this._keys     = keys;
     this._ship     = ship;
     this._gameMode = gameMode;
 }
Esempio n. 3
0
 public override void AddShip(ShipArguments s)
 {
     this._map.Ship = new Ship(s.Label, s.Position, s.Speed, s.Dimension, s.Mass, s.Health, s.Color);
     this.NotifyObservers();
 }
Esempio n. 4
0
 public override void AddShip(ShipArguments s)
 {
     this._map.Ship = new Ship(s.Label, s.Position, s.Speed, s.Dimension, s.Mass, s.Health, s.Color);
     this.NotifyObservers();
 }
Esempio n. 5
0
 public abstract void AddShip(ShipArguments s);
Esempio n. 6
0
 public Configuration(GameMode gameMode, ShipArguments ship, KeyBinding keys)
 {
     this._keys = keys;
     this._ship = ship;
     this._gameMode = gameMode;
 }
Esempio n. 7
0
 public abstract void AddShip(ShipArguments s);