Ejemplo n.º 1
0
        public void ShouldReturnBottomHorizontalLine()
        {
            var board = GameSettingsLoader.Load(
                @" .▲. 
 XXX ");
            var type = WallAnalyzer.GetWallType(board.Walls, (1, 1), board.Width, board.Height);

            type.Should().Be(WallType.HorizontalLine);
        }
Ejemplo n.º 2
0
        public void ShouldAnalyzeTopRightCornerAsTopRightArc()
        {
            var board = GameSettingsLoader.Load(
                @" XX 
 ▲X ");
            var type = WallAnalyzer.GetWallType(board.Walls, (1, 0), board.Width, board.Height);


            type.Should().Be(WallType.TopRightArc);
        }
Ejemplo n.º 3
0
        public void ShouldReturnRightVerticalLine()
        {
            var board = GameSettingsLoader.Load(
                @" ..X 
 ..X 
 .▲X ");
            var type = WallAnalyzer.GetWallType(board.Walls, (2, 1), board.Width, board.Height);

            type.Should().Be(WallType.VerticalLine);
        }
Ejemplo n.º 4
0
        public void ShouldAnalyzeTopLeftEdgeAsTopLeftArc()
        {
            var board = GameSettingsLoader.Load(
                @" ... 
 .XX 
 ▲X ");
            var type = WallAnalyzer.GetWallType(board.Walls, (1, 1), board.Width, board.Height);


            type.Should().Be(WallType.TopLeftArc);
        }
Ejemplo n.º 5
0
        public void ShouldAnalyzeRightHorizontalLineEdgeAsHorizontalLine()
        {
            var board = GameSettingsLoader.Load(
                @"    
   XX
   ▲ ");
            var type = WallAnalyzer.GetWallType(board.Walls, (1, 1), board.Width, board.Height);


            type.Should().Be(WallType.HorizontalLine);
        }
Ejemplo n.º 6
0
        public void ShouldAnalyzeBottomRightCorner1AsBottomRightArc()
        {
            var board = GameSettingsLoader.Load(
                @" ▲XX 
 XXX 
 XXX ");
            var type = WallAnalyzer.GetWallType(board.Walls, (1, 1), board.Width, board.Height);


            type.Should().Be(WallType.BottomRightArc);
        }
Ejemplo n.º 7
0
        public void ShouldAnalyzeVerticalLine4AsVerticalLine()
        {
            var board = GameSettingsLoader.Load(
                @" XX.
 XX.
 XX▲");
            var type = WallAnalyzer.GetWallType(board.Walls, (1, 1), board.Width, board.Height);


            type.Should().Be(WallType.VerticalLine);
        }
Ejemplo n.º 8
0
        public void ShouldAnalyzeBottomLeftEdgeAsBottomLeftArc()
        {
            var board = GameSettingsLoader.Load(
                @" .X  
 .XX 
 .▲.");
            var type = WallAnalyzer.GetWallType(board.Walls, (1, 1), board.Width, board.Height);


            type.Should().Be(WallType.BottomLeftArc);
        }