Example #1
0
        public Boolean Move(Direction direction)
        {
            Boolean success = WrappedRover.Move(direction);

            _actions.Add(new RoverAction(Instruction.Move, direction));
            return(success);
        }
        public Boolean Move(Direction direction)
        {
            Position previous  = Position;
            Boolean  isSuccess = WrappedRover.Move(direction);

            CancellationToken.ThrowIfCancellationRequested();
            if (isSuccess)
            {
                PositionUpdateProgress.Report(new PositionUpdate(previous, Position));
            }
            StatsUpdateProgress.Report(StatsUpdate);

            Thread.Sleep(100);
            return(isSuccess);
        }