Пример #1
0
        public void MoveBackward()
        {
            var currentOrientation = _orientationReader.GetCurrentOrientation();

            switch (currentOrientation)
            {
            case "N":
                Y = Y - 1;
                break;

            case "E":
                X = X - 1;
                break;

            case "W":
                if (X == _max_X)
                {
                    X = -1;
                }
                X = X + 1;
                break;

            case "S":
                Y = Y + 1;
                break;

            default:
                break;
            }
        }
 public void MoveBackward()
 {
     _strategies[_orientationReader.GetCurrentOrientation()].MoveBackward(_coOrdinates);
 }