コード例 #1
0
ファイル: m_MapTests.cs プロジェクト: midas06/Theseus
        public void m_MapTest_NorthWallBroken_AllMaps()
        {
            Game aGame = new Game();
            aGame.SetMap(1);
            Tile[,] theMap;
            Tile[][,] allTheMaps = aGame.GetFiler().GetAllMyMaps();
            bool expected, actual;
            expected = false;
            actual = false;

            // return true if one North wall is broken

            for (int i = 0; i < allTheMaps.Length; i++)
            {
                if (allTheMaps[i] != null)
                {
                    theMap = allTheMaps[i];
                    if (aGame.NorthWallBroken(theMap) == true)
                    {
                        actual = true;
                    }
                }
            }

            Assert.AreEqual(expected, actual, "One of the North walls is broken");
        }