Exemplo n.º 1
0
        public override bool Equals(Object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            SurfaceCoordinate p = (SurfaceCoordinate)obj;

            return((X_Position == p.X_Position) && (Y_Position == p.Y_Position));
        }
 public RobotPosition(Direction direction, SurfaceCoordinate coordinate)
 {
     Direction  = direction;
     Coordinate = coordinate;
 }
 public PlaceCommandParam(Direction direction, SurfaceCoordinate surfaceCoordinate)
 {
     Direction         = direction;
     SurfaceCoordinate = surfaceCoordinate;
 }
 public bool Validate(SurfaceCoordinate pos)
 {
     return(pos.X_Position >= MIN_X && pos.X_Position <= MAX_X &&
            pos.Y_Position >= MIN_Y && pos.Y_Position <= MAX_Y);
 }