Exemplo n.º 1
0
        private void Remove(IMoveController moveController,
                            ColocateCoordinateView colocateCoordinateView)
        {
            Error error = Error.NOT_ERROR;

            do
            {
                origin = colocateCoordinateView.GetCoordinate();
                error  = moveController.ValidateOrigin(origin);
                if (error != Error.NOT_ERROR)
                {
                    io.Writeln("" + error);
                }
            } while (error != Error.NOT_ERROR);
            moveController.Remove(origin);
        }
Exemplo n.º 2
0
        private void Put(IMoveController moveController,
                         ColocateCoordinateView colocateCoordinateView)
        {
            Models.Coordinate target;
            Error             error = Error.NOT_ERROR;

            do
            {
                target = colocateCoordinateView.GetCoordinate();
                error  = moveController.ValidateTarget(origin, target);
                if (error != Error.NOT_ERROR)
                {
                    io.Writeln("" + error);
                }
            } while (error != Error.NOT_ERROR);
            moveController.Put(target);
        }