private GameEngine() { ArmyFactory = new StandardArmyFactory(); _firstArmy = ArmyFactory.GetArmy(0); _secondArmy = ArmyFactory.GetArmy(0); CommandInvoker = new Invoker(); }
public void NewGame(int cost, string first = "First Army", string second = "Second Army") { IArmyFactory armyFactory = new StandardArmyFactory(); _firstArmy = armyFactory.GetArmy(cost); _firstArmy.Name = first; _secondArmy = armyFactory.GetArmy(cost); _secondArmy.Name = second; AddObservers(); IsDeadHeat = false; _random = new Random(); SetStrategy(StrategyTypes.OneToOne); }