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(); } }
public Configuration(GameMode gameMode, ShipArguments ship, KeyBinding keys) { this._keys = keys; this._ship = ship; this._gameMode = gameMode; }
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(); }
public abstract void AddShip(ShipArguments s);