示例#1
0
            public void Move_North_Initial()
            {
                BinaryTrack sut = BinaryTrack.StartEmptyTrack(_gameProps);

                var output = sut.MoveNorth();

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

                MapAssert.AllCoordinatesAreZeroExcept(map, (0, 0), (0, 1));
            }
示例#2
0
            public void Move_North()
            {
                var shape = new[]
                {
                    "xx.............",
                    ".xX............",
                    "...............",
                    "...............",
                };
                BinaryTrack sut = BinaryTrack.FromString(_gameProps, shape);

                var output = sut.MoveNorth();

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

                MapAssert.AllCoordinatesAreZeroExcept(map, (0, 0), (1, 0), (1, 1), (2, 1), (2, 0));
            }