/// <summary> /// /// </summary> /// <param name="opCodeGenerator"></param> /// <param name="genomeLength"></param> public GenomeProducer(IOpCodeGenerator opCodeGenerator, int genomeLength, int mutationsCount) { this.opCodeGenerator = opCodeGenerator; this.genomeLength = genomeLength; this.mutationsCount = mutationsCount; random = new Random(); }
public EcoSystemController(CanvasAnimatedControl control, MapSize mapSize, IEnumerable <Coordinates> obstacles) { this.control = control; this.obstacles = obstacles; this.mapSize = mapSize; generator = new OpCodeGenerator(); bots = ImmutableList <BeetleBot> .Empty; map = new CellType[mapSize.Width, mapSize.Height]; cellSize = new Size(control.Size.Width / mapSize.Width, control.Size.Height / mapSize.Height); genomeProducer = new GenomeProducer(generator, GenomeLength, 1); Epoch = 0; Scene = new Scene(this); control.PointerEntered += OnPointerEntered; control.PointerExited += OnPointerExited; control.PointerPressed += OnPointerPressed; control.PointerReleased += OnPointerReleased; control.PointerMoved += OnPointerMoved; }