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"); }
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"); }
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"); }
public void e_ExitTile_NotFinished() { Point thesStart; bool expected, actual; thesStart = new Point(2, 2); expected = false; Game aGame = new Game(); Theseus theseus = aGame.GetTheseus(); Minotaur minotaur = aGame.GetMinotaur(); aGame.SetTestMap(2); aGame.GetTheseus().Coordinate = thesStart; /* .___.___.___.___. | 0 1 2 3 | . . . . . | 1 | . . . . .___. | 2 T X . . . . .___. | 3 | .___.___.___.___. */ aGame.GetTheseus().Move(Direction.Right); actual = aGame.GetTheseus().IsFinished(); Assert.AreEqual(actual, expected, "Theseus finished the maze"); }
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"); }
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"); }
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"); }
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"); }