Exemple #1
0
        public void CreateActors(Actors actorType, int count)//Adding actors to List and linking on Grid
        {
            int created = 0;

            while (created < count)
            {
                {
                    Actor actor = null;
                    switch (actorType)
                    {
                    case Actors.Snake:
                        actor = new Snake(1);
                        break;

                    case Actors.BullShit:
                        actor = new BullShit();
                        break;

                    case Actors.Rabbit:
                        actor = new Rabbit();
                        break;

                    case Actors.Fox:
                        actor = new Fox();
                        break;
                    }
                    actors.Add(actor);
                    grid[actor.coords] = actor;
                    created++;
                }
            }
        }
Exemple #2
0
        public override void Act()
        {
            return;

            Coords nextCoords = new Coords(this.coords);

            this.NextCoords(ref nextCoords);
            if (GridCellEmpty(nextCoords))
            {
                //this.Teleport(nextCoords);
                BullShit newCopy = new BullShit(nextCoords);
                this.AddNew(newCopy);
            }
        }