コード例 #1
0
        public void c_MinotaurReaction_Diagonal_1block_downright()
        {
            Point expectedPoint, actualPoint, minStart, thesStart;
            minStart = new Point(1, 1);
            thesStart = new Point(2, 2);
            expectedPoint = new Point(2, 2);
            Game aGame = new Game();
            Theseus theseus = aGame.GetTheseus();
            Minotaur minotaur = aGame.GetMinotaur();

            aGame.SetTestMap(2);
            aGame.GetTheseus().Coordinate = thesStart;
            aGame.GetMinotaur().Coordinate = minStart;

            /*
            .___.___.___.___.
            | 0   1   2   3 |
            .   .   .   .   .
            | 1   M         |
            .   .   .   .   .___.
            | 2       T       X
            .   .   .   .   .___.
            | 3             |
            .___.___.___.___. */

            aGame.GetMinotaur().Hunt();
            actualPoint = aGame.GetMinotaurPosition();

            Assert.AreEqual(expectedPoint, actualPoint, "Minotaur was not on the expected Tile");
        }
コード例 #2
0
        public void d_MinotaurReaction_Diagonal_blockeddownright_1block_downright()
        {
            Point expectedPoint, actualPoint, minStart, thesStart;
            minStart = new Point(1, 1);
            thesStart = new Point(2, 2);
            expectedPoint = new Point(1, 1);
            Game aGame = new Game();
            Theseus theseus = aGame.GetTheseus();
            Minotaur minotaur = aGame.GetMinotaur();

            aGame.SetTestMap(2);
            Tile[,] theMap = aGame.GetMap();
            theMap[1, 1].MyWalls = TheWalls.South | TheWalls.East;
            theMap[1, 2].MyWalls = TheWalls.North;
            theMap[2, 1].MyWalls = TheWalls.West;
            aGame.GetTheseus().Coordinate = thesStart;
            aGame.GetMinotaur().Coordinate = minStart;

            /*
            .___.___.___.___.
            | 0   1   2   3 |
            .   .   .   .   .
            | 1   M |       |
            .   .___.   .   .___.
            | 2       T       X
            .   .   .   .   .___.
            | 3             |
            .___.___.___.___. */

            aGame.GetMinotaur().Hunt();
            actualPoint = aGame.GetMinotaurPosition();

            Assert.AreEqual(expectedPoint, actualPoint, "Minotaur was not on the expected Tile");
        }
コード例 #3
0
        public void d_MinotaurReaction_Diagonal_blockeddownleft_3blocks_downleft_3()
        {
            Point expectedPoint, actualPoint, minStart, thesStart;
            minStart = new Point(3, 0);
            thesStart = new Point(2, 3);
            expectedPoint = new Point(3, 0);
            Game aGame = new Game();
            Theseus theseus = aGame.GetTheseus();
            Minotaur minotaur = aGame.GetMinotaur();

            aGame.SetTestMap(2);
            Tile[,] theMap = aGame.GetMap();
            theMap[3, 0].MyWalls = TheWalls.North | TheWalls.South | TheWalls.East | TheWalls.West;
            theMap[3, 1].MyWalls = TheWalls.North | TheWalls.East;
            theMap[2, 0].MyWalls = TheWalls.North | TheWalls.East;
            aGame.GetTheseus().Coordinate = thesStart;
            aGame.GetMinotaur().Coordinate = minStart;

            /*
            .___.___.___.___.
            | 0   1   2 | M |
            .   .   .   .___.
            | 1             |
            .   .   .   .   .___.
            | 2               X
            .   .   .   .   .___.
            | 3       T     |
            .___.___.___.___. */

            aGame.GetMinotaur().Hunt();
            actualPoint = aGame.GetMinotaurPosition();

            Assert.AreEqual(expectedPoint, actualPoint, "Minotaur was not on the expected Tile");
        }
コード例 #4
0
        public void c_MinotaurReaction_Vertical_3blocks()
        {
            Point expectedPoint, actualPoint, minStart, thesStart;
            minStart = new Point(0, 0);
            thesStart = new Point(0, 3);
            expectedPoint = new Point(0, 2);
            Game aGame = new Game();
            Theseus theseus = aGame.GetTheseus();
            Minotaur minotaur = aGame.GetMinotaur();

            aGame.SetTestMap(2);
            aGame.GetTheseus().Coordinate = thesStart;
            aGame.GetMinotaur().Coordinate = minStart;

            /*
            .___.___.___.___.
            | M   1   2   3 |
            .   .   .   .   .
            | 1             |
            .   .   .   .   .___.
            | E               X
            .   .   .   .   .___.
            | T             |
            .___.___.___.___. */

            aGame.GetMinotaur().Hunt();
            actualPoint = aGame.GetMinotaurPosition();

            Assert.AreEqual(expectedPoint, actualPoint, "Minotaur was not on the expected Tile");
        }
コード例 #5
0
        public void d_MinotaurReaction_Diagonal_blockedLeft_1block_upleft()
        {
            Point expectedPoint, actualPoint, minStart, thesStart;
            minStart = new Point(1, 1);
            thesStart = new Point(0, 0);
            expectedPoint = new Point(0, 0);
            Game aGame = new Game();
            Theseus theseus = aGame.GetTheseus();
            Minotaur minotaur = aGame.GetMinotaur();

            aGame.SetTestMap(2);
            aGame.GetMap()[1, 1].MyWalls = TheWalls.West;
            aGame.GetMap()[0, 1].MyWalls = TheWalls.West | TheWalls.East;
            aGame.GetTheseus().Coordinate = thesStart;
            aGame.GetMinotaur().Coordinate = minStart;

            /*
            .___.___.___.___.
            | T   1   2   3 |
            .   .   .   .   .
            | 1 | M         |
            .   .   .   .   .___.
            | 2               X
            .   .   .   .   .___.
            | 3             |
            .___.___.___.___. */

            aGame.GetMinotaur().Hunt();
            actualPoint = aGame.GetMinotaurPosition();

            Assert.AreEqual(expectedPoint, actualPoint, "Minotaur was not on the expected Tile");
        }
コード例 #6
0
        public void d_MinotaurReaction_Vertical_1block()
        {
            Point expectedPoint, actualPoint, minStart, thesStart;
            minStart = new Point(0, 0);
            thesStart = new Point(0, 1);
            expectedPoint = new Point(0, 0);
            Game aGame = new Game();
            Theseus theseus = aGame.GetTheseus();
            Minotaur minotaur = aGame.GetMinotaur();

            aGame.SetTestMap(2);
            aGame.GetMap()[0, 0].MyWalls = TheWalls.North | TheWalls.South | TheWalls.West;
            aGame.GetMap()[0, 1].MyWalls = TheWalls.North | TheWalls.West;
            aGame.GetTheseus().Coordinate = thesStart;
            aGame.GetMinotaur().Coordinate = minStart;

            /*
            .___.___.___.___.
            | M   1   2   3 |
            .___.   .   .   .
            | T             |
            .   .   .   .   .___.
            | 2               X
            .   .   .   .   .___.
            | 3             |
            .___.___.___.___. */

            aGame.GetMinotaur().Hunt();
            actualPoint = aGame.GetMinotaurPosition();

            Assert.AreEqual(expectedPoint, actualPoint, "Minotaur was not on the expected Tile");
        }
コード例 #7
0
        public void d_MinotaurReaction_Diagonal_blockedup_3blocks_upright_2()
        {
            Point expectedPoint, actualPoint, minStart, thesStart;
            minStart = new Point(0, 3);
            thesStart = new Point(1, 0);
            expectedPoint = new Point(1, 2);
            Game aGame = new Game();
            Theseus theseus = aGame.GetTheseus();
            Minotaur minotaur = aGame.GetMinotaur();

            aGame.SetTestMap(2);
            Tile[,] theMap = aGame.GetMap();
            theMap[0, 3].MyWalls = TheWalls.South | TheWalls.West | TheWalls.North;
            theMap[0, 2].MyWalls = TheWalls.West | TheWalls.South;
            aGame.GetTheseus().Coordinate = thesStart;
            aGame.GetMinotaur().Coordinate = minStart;

            /*
            .___.___.___.___.
            | 0   T   2   3 |
            .   .   .   .   .
            | 1             |
            .   .   .   .   .___.
            | 2               X
            .___.   .   .   .___.
            | M             |
            .___.___.___.___. */

            aGame.GetMinotaur().Hunt();
            actualPoint = aGame.GetMinotaurPosition();

            Assert.AreEqual(expectedPoint, actualPoint, "Minotaur was not on the expected Tile");
        }