예제 #1
0
            public void Move_East_Initial()
            {
                BinaryTrack sut = BinaryTrack.StartEmptyTrack(_gameProps);

                var output = sut.MoveEast();

                Assert.AreEqual((1, 0), output.Head);
                var map = output.ToCartesian();

                MapAssert.AllCoordinatesAreZeroExcept(map, (0, 0), (1, 0));
            }
예제 #2
0
            public void Move_East_ShiftNeeded()
            {
                var shape = new[]
                {
                    "............xxX",
                    "............xx.",
                    "...............",
                    "...............",
                };
                BinaryTrack sut = BinaryTrack.FromString(_gameProps, shape);

                var output = sut.MoveEast();

                Assert.AreEqual((14, 0), output.Head);
                var map = output.ToCartesian();

                MapAssert.AllCoordinatesAreZeroExcept(map, (11, 0), (12, 0), (13, 0), (14, 0), (11, 1), (12, 1));
            }