It’s easier to code: if player in (any of these coordinates) -> move player to these coordinates/kill them.
I’ve never programmed a game before, but I’d assume it’d take more coding to say: if player at x, y coordinate tries to move to x, y-1 (invalid coordinate), return player to x, y coordinate, creating the…