Exemple #1
0
        public void Look_Finds_Correct_Chars()
        {
            var map             = @"
                               C@A
                                B
                        ";
            var asciiPathFinder = new ASCIIPathFinder();

            asciiPathFinder.LoadASCIIMap(map);
            asciiPathFinder.GoToStart();

            // Up is out of bounds
            Assert.AreEqual(asciiPathFinder.Look(Direction.Up), null);
            Assert.AreEqual(asciiPathFinder.Look(Direction.Right), 'A');
            Assert.AreEqual(asciiPathFinder.Look(Direction.Down), 'B');
            Assert.AreEqual(asciiPathFinder.Look(Direction.Left), 'C');
        }