public void SetUp()
 {
     height    = 100;
     width     = 200;
     testField = new ForestField(height, width,
                                 new HashSet <MonsterCamp>(),
                                 new HashSet <Carrot>(),
                                 new HashSet <Point>());
 }
Beispiel #2
0
        public void InitForestField()
        {
            var slime = new Creature
                            (CreatureOwner.Computer, CreatureName.Slime, 200, 5, 10, 15);
            var skeleton = new Creature
                               (CreatureOwner.Computer, CreatureName.Skeleton, 150, 70, 0, 5);
            var penguin = new Creature
                              (CreatureOwner.Computer, CreatureName.Penguin, 250, 5, 25, 10);

            var team1 = new List <Creature> {
                new Creature(slime), new Creature(skeleton), new Creature(slime)
            };
            var team2 = new List <Creature> {
                new Creature(penguin), new Creature(slime), new Creature(penguin)
            };
            var team3 = new List <Creature> {
                new Creature(skeleton), new Creature(penguin), new Creature(skeleton)
            };

            var camps = new HashSet <MonsterCamp>
            {
                new MonsterCamp(team1, new Point(3, 0)),
                new MonsterCamp(team2, new Point(4, 1)),
                new MonsterCamp(team3, new Point(1, 4))
            };

            var carrots = new HashSet <Carrot>
            {
                new Carrot(new Point(0, 2)),
                new Carrot(new Point(0, 4)),
                new Carrot(new Point(4, 0))
            };

            var walls = new HashSet <Point>
            {
                new Point(1, 0),
                new Point(1, 2),
                new Point(1, 3),
                new Point(0, 3),
                new Point(3, 1),
                new Point(3, 3),
            };

            State  = GameState.InForest;
            Forest = new ForestField(5, 5, camps, carrots, walls);
        }
Beispiel #3
0
 public Game()
 {
     State  = GameState.NotStarted;
     Forest = null;
     Battle = null;
 }