Ejemplo n.º 1
0
        public void DebugMapTest()
        {
            var map = DebugData.GetFlatlandMap(data);

            Assert.AreEqual("Flatland", map.Name);
            Assert.AreEqual(15, map.Width);
            Assert.AreEqual(20, map.Height);

            //test a a few tiles at "random"
            var floorTile = map.GetTile(1, 1);

            Assert.AreEqual(true, floorTile.Passable);
            var wallTile = map.GetTile(0, 0);

            Assert.AreEqual(false, wallTile.Passable);
        }
        public static DungeonMaster GetDebugDM(GameData data)
        {
            var DM = new DungeonMaster(data);

            DM.map = DebugData.GetFlatlandMap(data);

            DM.Sides.Add(new Side("Heros"));
            DM.Sides.Add(new Side("The Foe"));
            DM.currentSideID = DM.Sides[0].ID;

            var robby = DebugData.GetDebugCharacter();

            robby.InitializeIndividual("Robby", new Position(1, 1), DM.Sides[0].ID, Guid.NewGuid());
            DM.Characters.Add(robby);

            var zach = DebugData.GetDebugCharacter();

            zach.InitializeIndividual("Zach", new Position(1, 3), DM.Sides[1].ID, Guid.NewGuid());
            DM.Characters.Add(zach);

            return(DM);
        }