Prevents plateform from moving outside the screen