Esempio n. 1
0
 public Rover()
 {
     coordinate = new Coordinate();
     direction  = new Direction();
     parse      = new Parser();
     check      = new CheckBoundaries();
 }
Esempio n. 2
0
        public void ChangeCoordinate(ref Direction direction, ref Coordinate coordinate, ref CheckBoundaries check)
        {
            Coordinate coord  = _getvalue[direction.Dir];
            var        direct = new Coordinate()
            {
                X = coordinate.X + coord.X,
                Y = coordinate.Y + coord.Y
            };

            if (check.isvalid(direct.X, direct.Y))
            {
                coordinate.X = direct.X;

                coordinate.Y = direct.Y;
            }
        }