public void AddUnit(string containerType, string ratio, string newType) { //var containersList = this.manager.GetContainers(); UnitsContainer container = this.containers.Find(m => m.Name == containerType) as UnitsContainer; container.AddUnit(ratio, newType); }
public BattlefieldVision(PawnModel posessedPawn, Orientation directionOfAttack, UnitsContainer units, MapModel map, BattleCircumstances battleCircumstances) { _posessedPawn = posessedPawn; _directionOfAttack = directionOfAttack; _units = units; _map = map; _battleCircumstances = battleCircumstances; }
public double Convert(string baseType, string convertedType, string baseVal, string containerType) { var containersList = this.manager.GetContainers(); UnitsContainer container = containersList.Find(m => m.Name == containerType) as UnitsContainer; double score; double baseValue = double.Parse(baseVal); container.convert(baseType, baseValue, convertedType, out score); this.repo.AddSingleStatistic(new StatisticDTO() { Type = containerType, BaseUnit = baseType, BaseValue = baseValue, ConvertedUnit = convertedType, ConvertedValue = score, Time = DateTime.Now }); return(score); }
public BattleArbiter(UnitsContainer units, ProjectilesContainer projectiles, MapModel mapModel) { _units = units; _projectiles = projectiles; _mapModel = mapModel; }
public BattleUnitOwner() { _units = new UnitsContainer(this); }