public Flotte(Flotte uneFlotte) { BattleShip = uneFlotte.BattleShip; Destroyeur = uneFlotte.Destroyeur; Submarine = uneFlotte.Submarine; Aircraft = uneFlotte.Aircraft; Patrol = uneFlotte.Patrol; unType = uneFlotte.unType; }
private void InitializeFlotte() { Position[] tabAircraft = new Position[3]; // 3 SetLesTrucs(0, 'A', 0, false, tabAircraft); SetLesTrucs(1, 'A', 1, false, tabAircraft); SetLesTrucs(2, 'A', 2, false, tabAircraft); Position[] tabBattleShip = new Position[5]; // 5 SetLesTrucs(0, 'B', 0, false, tabBattleShip); SetLesTrucs(1, 'B', 1, false, tabBattleShip); SetLesTrucs(2, 'B', 2, false, tabBattleShip); SetLesTrucs(3, 'B', 3, false, tabBattleShip); SetLesTrucs(4, 'B', 4, false, tabBattleShip); Position[] tabDestroyeur = new Position[4]; // 4 SetLesTrucs(0, 'C', 0, false, tabDestroyeur); SetLesTrucs(1, 'C', 1, false, tabDestroyeur); SetLesTrucs(2, 'C', 2, false, tabDestroyeur); SetLesTrucs(3, 'C', 3, false, tabDestroyeur); Position[] tabSubmarine = new Position[3]; // 3 SetLesTrucs(0, 'D', 0, false, tabSubmarine); SetLesTrucs(1, 'D', 1, false, tabSubmarine); SetLesTrucs(2, 'D', 2, false, tabSubmarine); Position[] tabPatrol = new Position[2]; // 2 SetLesTrucs(0, 'E', 0, false, tabPatrol); SetLesTrucs(1, 'E', 1, false, tabPatrol); maFlotte = new Flotte(tabAircraft, tabBattleShip, tabDestroyeur, tabSubmarine, tabPatrol, TypeFlotte.allier); }