Beispiel #1
0
        public static MarsRover CreateRover(MarsRoverPosition roverPostion, MarsPlateu marsPlateu)
        {
            MarsRover marsRover = new MarsRover();

            marsRover.MarsPlateu = marsPlateu;
            marsRover.CurrentPositionXCoOridante  = roverPostion.CurrentPositionXCoOridante;
            marsRover.CurrentPositionYCoOrdinate  = roverPostion.CurrentPositionYCoOrdinate;
            marsRover.CurrentDirectionOfRover     = roverPostion.CurrentDirectionOfRover;
            marsRover.PreviousPositionXCoOridante = marsRover.CurrentPositionXCoOridante;
            marsRover.PreviousPositionYCoOrdinate = marsRover.CurrentPositionYCoOrdinate;
            marsRover.PrevioustDirectionOfRover   = marsRover.CurrentDirectionOfRover;
            return(marsRover);
        }
Beispiel #2
0
 public void CreateMarsPlateu(MarsPlateuSize marePlateuSize)
 {
     this.marsPlateu = new MarsPlateu(marePlateuSize.XcoOdinate, marePlateuSize.YcoOrdinate);
 }