Beispiel #1
0
        public void Move_ValidMoveOneSpace_MowerMovesOneSpace(Heading heading, string expected)
        {
            var mower = new Mower(new Point(3,3), heading, new Point(5,5));

            var result = mower.Move("M");

            Assert.AreEqual(expected, result);
        }
Beispiel #2
0
        public void Move_InvalidMoveOneSpaceValidTurn_MowerDoesnNotMoveButDoesTurn(int spx, int spy, Heading heading, int gbx, int gby, string instructions, string expected)
        {
            var mower = new Mower(new Point(spx,spy), heading, new Point(gbx,gby));

            var result = mower.Move(instructions);

            Assert.AreEqual(expected, result);
        }
Beispiel #3
0
        public void Move()
        {
            Position destination = new Position(_mower.Position.X, _mower.Position.Y + 1, _mower.Position.Heading);

            _mower.Move(destination);
        }