Normally to set a boundary at a certain area, I would implement something like:
if(player.X > 400){
player.X = 400;
}
This acts as though there is a vertical line at X=400, blocking movement beyond that. I'm wondering how I would implement at boundary for an area that is at a slant or diagonal rather than vertical/horizontal.