public EvolutionDreamer(ItemOptionsArco itemOptions, BotShellColorsDNA shellColors, int numTrackedBots) { _itemOptions = itemOptions; _shellColors = shellColors; _mutateArgs = GetMutateArgs(itemOptions); _dreamWorld = new OfflineWorld(BOUNDRYSIZE, itemOptions); _trackedBots = new TrackedBot[numTrackedBots]; for (int cntr = 0; cntr < numTrackedBots; cntr++) { _trackedBots[cntr] = new TrackedBot(_lock); } _timer = new System.Timers.Timer(); _timer.AutoReset = false; _timer.Interval = 250; _timer.Elapsed += Timer_Elapsed; _timer.Start(); _ruleTimer = new System.Timers.Timer(); _ruleTimer.AutoReset = false; _ruleTimer.Interval = 50; _ruleTimer.Elapsed += RuleTimer_Elapsed; _ruleTimer.Start(); _ruleElapsed = _ruleTimer.Interval / 1000d; }
public EvolutionDreamer(ItemOptionsArco itemOptions, BotShellColorsDNA shellColors, int numTrackedBots) { _shellColors = shellColors; _mutateArgs = GetMutateArgs(itemOptions); _dreamWorld = new OfflineWorld(BOUNDRYSIZE, itemOptions); _trackedBots = new TrackedBot[numTrackedBots]; for (int cntr = 0; cntr < numTrackedBots; cntr++) { _trackedBots[cntr] = new TrackedBot(_lock); } _timer = new System.Timers.Timer(); _timer.AutoReset = false; _timer.Interval = 250; _timer.Elapsed += Timer_Elapsed; _timer.Start(); _ruleTimer = new System.Timers.Timer(); _ruleTimer.AutoReset = false; _ruleTimer.Interval = 50; _ruleTimer.Elapsed += RuleTimer_Elapsed; _ruleTimer.Start(); _ruleElapsed = _ruleTimer.Interval / 1000d; }