Пример #1
0
 public int ExecuteClear(ExecuteOrder executeclean)
 {
     JumpTo(executeclean.StartingPos);
     foreach (var cmd in executeclean.cmd)
     {
         this.Movetowards(cmd.Moveto, cmd.numSteps);
     }
     return(_cleanOffice.Count);
 }
Пример #2
0
        public ExecuteOrder ReadCommands()
        {
            int            numCmds  = this.NumCommands();
            Coord          startPos = this.StartingCoord();
            List <MoveCmd> cmd      = new List <MoveCmd>();

            while (cmd.Count < numCmds)
            {
                cmd.Add(this.ReadMovecd());
            }
            ExecuteOrder execorder = new ExecuteOrder(startPos, cmd);

            return(execorder);
        }