Beispiel #1
0
 public RobotRat(int rows, int cols)
 {
     Console.Clear();
     _floor            = new char[rows, cols];
     _current_row      = 10;
     _current_col      = 10;
     _previous_row     = _current_row;
     _previous_col     = _current_col;
     _its_direction    = Directions.NORTH;
     _its_pen_position = PenPositions.UP;
     InitializeFloor();
 }
Beispiel #2
0
 /// <summary>
 /// Sets the pen to the DOWN state.
 /// </summary>
 public void SetPenDown()
 {
     pen_position = PenPositions.DOWN;
     Console.WriteLine("The pen is " + pen_position);
 }
Beispiel #3
0
 /// <summary>
 /// Sets the pen to the UP state.
 /// </summary>
 public void SetPenUp()
 {
     pen_position = PenPositions.UP;
     Console.WriteLine("The pen is " + pen_position);
 }
Beispiel #4
0
 public void SetPenDown()
 {
     _its_pen_position = PenPositions.DOWN;
     //Console.WriteLine("Pen is "+ _its_pen_position);
 }
Beispiel #5
0
 public void SetPenUp()
 {
     _its_pen_position = PenPositions.UP;
     //Console.WriteLine("Pen is "+ _its_pen_position);
 }