Beispiel #1
0
        public void TestBasicFill()
        {
            Map map = new Map(2, 2);
            Rectangle expectedRect = new Rectangle(0, 0, 2, 2);
            Rectangle rect = map.Fill(0, 1, fillTerrain);
            Assert.AreEqual(expectedRect, rect);

            foreach (Terrain terrain in map.GetTerrainData())
            {
                Assert.AreEqual(fillTerrain, terrain);
            }
        }
Beispiel #2
0
        public void TestLargeFill()
        {
            Map map = new Map(50, 100);
            Rectangle expectedRect = new Rectangle(0, 0, 50, 100);
            Rectangle rect = map.Fill(5, 5, fillTerrain);
            Assert.AreEqual(expectedRect, rect);

            foreach (Terrain terrain in map.GetTerrainData())
            {
                Assert.AreEqual(fillTerrain, terrain);
            }
        }