public void MustReturnCorrectOrderOfPositions_ReversedMode()
        {
            var gameProps = new GameProps {
                Width = 4, Height = 4, MyId = 0
            };

            _console.Record("....");
            _console.Record("....");
            _console.Record("....");
            _console.Record("....");
            var mapScanner = new MapScanner(gameProps, _console);
            PreComputedSpiralNavigator sut = new PreComputedSpiralNavigator(mapScanner, _console, true, gameProps);

            var firstPosition = sut.First();

            Assert.AreEqual((1, 2), firstPosition);

            Assert.AreEqual('E', sut.Next((1, 2)).Direction);
            Assert.AreEqual('N', sut.Next((2, 2)).Direction);
            Assert.AreEqual('W', sut.Next((2, 1)).Direction);
            Assert.AreEqual('W', sut.Next((1, 1)).Direction);
            Assert.AreEqual('S', sut.Next((0, 1)).Direction);
            Assert.AreEqual('N', sut.Next((3, 3)).Direction);
            Assert.AreEqual('W', sut.Next((3, 0)).Direction);
            Assert.AreEqual('W', sut.Next((2, 0)).Direction);
            Assert.AreEqual('W', sut.Next((1, 0)).Direction);
            Assert.IsNull(sut.Next((0, 0)));
        }
        public void MustAvoidIslandsInMiddle()
        {
            var gameProps = new GameProps {
                Width = 4, Height = 4, MyId = 0
            };

            _console.Record("....");
            _console.Record(".xx.");
            _console.Record(".xx.");
            _console.Record("....");
            var mapScanner = new MapScanner(gameProps, _console);
            PreComputedSpiralNavigator sut = new PreComputedSpiralNavigator(mapScanner, _console, false, gameProps);

            var firstPosition = sut.First();

            Assert.AreEqual((0, 0), firstPosition);
            Assert.AreEqual('E', sut.Next((0, 0)).Direction);
            Assert.AreEqual('S', sut.Next((3, 0)).Direction);
            Assert.AreEqual('S', sut.Next((3, 2)).Direction);
            Assert.AreEqual('N', sut.Next((0, 3)).Direction);
            Assert.IsNull(sut.Next((0, 1)));
        }