Uphill: If you can imagine taking a swing on a drastic uphill slope, you can picture hitting into the slope before making contact with the ball. For that reason, it is generally taught to have the ball be a bit further forward in the stance so that when contact is made, the swing is going more up with the slope. Downhill: As expected, the remedy is the opposite of an uphill lie. The ball should go back a bit further in the stance. In both uphill and downhill cases, the adjustment will depend on the severity of the slope but likely shouldn't be too drastic.