Example #1
0
        /// <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);
        }
Example #2
0
        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;
        }
Example #3
0
        /// <inheritdoc />
        public void DoBeetleBotDies(BeetleBot bot)
        {
            RemoveBeetBot(bot);
            Occupy(bot.Coordinates, false);

            if (AlphaBotsCount < bots.Count)
            {
                return;
            }

            var genomes = StopEpoch();

            Epoch++;

            StartEpoch(genomes);
        }