예제 #1
0
 public void ForeachMultiple_WhenXIsEvenAndYIsOddAndSizeIs2(TileLocator tileLocator)
 {
     tileLocator.ForeachMultitile(48, 47, 2).Should().HaveCount(4).
     And.Contain(new[]
     {
         new Position(48, 47),
         new Position(49, 46),
         new Position(49, 47),
         new Position(49, 48)
     }
                 );
 }
예제 #2
0
        public void ForeachMultiple_WhenXAndYAreEvenAndSizeIs2(TileLocator tileLocator)
        {
            var positions = tileLocator.ForeachMultitile(50, 46, 2);

            positions.Should().HaveCount(4).
            And.Contain(new[] {
                new Position(50, 46),
                new Position(50, 45),
                new Position(51, 46),
                new Position(50, 47)
            });
        }
예제 #3
0
 public void ForeachMultiple_WhenXIsEvenAndYIsEvenAndSizeIs3(TileLocator tileLocator)
 {
     tileLocator.ForeachMultitile(50, 46, 3).Should().HaveCount(9).
     And.Contain(new[]
     {
         new Position(50, 46),
         new Position(50, 45),
         new Position(51, 44),
         new Position(50, 47),
         new Position(51, 46),
         new Position(51, 45),
         new Position(51, 48),
         new Position(51, 47),
         new Position(52, 46),
     }
                 );
 }
예제 #4
0
 public void ForeachMultiple_WhenYIsOddAndSizeIs1(TileLocator tileLocator)
 {
     tileLocator.ForeachMultitile(0, 1, 1).Should().Equal(new Position(0, 1));
 }