/// <summary> /// /// </summary> /// <param name="genome"></param> /// <returns></returns> public BeetleBot CreateBeetleBot(IGenome genome) { var origin = positionProvider.CreatePosition(); var beetleBot = new BeetleBot(origin, genome, TimeSpan.FromSeconds(10.0d)); return(beetleBot); }
private void RemoveBeetBot(BeetleBot bot) { bots = bots.Remove(bot); Scene.Children.Remove(bot); if (null == bot.Coordinates) { return; } map[bot.Coordinates.X, bot.Coordinates.Y] &= CellType.AttributeMask; }
/// <inheritdoc /> public void DoBeetleBotDies(BeetleBot bot) { RemoveBeetBot(bot); Occupy(bot.Coordinates, false); if (AlphaBotsCount < bots.Count) { return; } var genomes = StopEpoch(); Epoch++; StartEpoch(genomes); }