/// <summary> /// Creates a 'Fight' object /// </summary> /// <param name="attackerPosition">Attacking cell</param> /// <param name="defenderPosition">Defending cell</param> /// <param name="simulator">The simulator</param> /// <param name="fightFinished">The fight finished callback</param> public Fight(Cell attackerPosition, Cell defenderPosition, Simulator simulator, Action<Cell, Cell> fightFinished) { AttackerPosition = attackerPosition; DefenderPosition = defenderPosition; Simulator = simulator; _fightCallback = fightFinished; }
public Grid(Parameter parameters, Cell[,] cells, List<GridWarrior> warriors) { StartingTime = DateTime.Now; Parameters = parameters; Sleeper = new ConcurrentQueue<Warrior>(); Cells = cells; Warriors = warriors; _usedSimulator = new Simulator(parameters); _evolver = new Evolver.Evolver(parameters); _run = false; }
public Grid(Parameter parameters) { StartingTime = DateTime.Now; Parameters = parameters; Sleeper = new ConcurrentQueue<Warrior>(); Cells = new Cell[Parameters.GridParameters.Size, Parameters.GridParameters.Size]; Warriors = new List<GridWarrior>(); _usedSimulator = new Simulator(parameters); _evolver = new Evolver.Evolver(parameters); _run = false; FillGrid(); }