public void MoveForwards()
 {
     _moverForward.MoveForwards(_field, Position, Direction);
 }
Exemplo n.º 2
0
        public void MoveForwardsByDirection()
        {
            var point = new Point(0, 0);

            _moverForward.MoveForwards(_field, point, new Point(0, 1));
            Assert.AreEqual(new Point(0, 1), point);

            _moverForward.MoveForwards(_field, point, new Point(1, 0));
            Assert.AreEqual(new Point(1, 1), point);

            _moverForward.MoveForwards(_field, point, new Point(0, -1));
            Assert.AreEqual(new Point(1, 0), point);

            _moverForward.MoveForwards(_field, point, new Point(-1, 0));
            Assert.AreEqual(new Point(0, 0), point);
        }