What kind of movement system are you using? Are you using "Rogue-Like Movement" AKA you move Tile to Tile or are you using smooth normal movement?
If you are using Tile based movement then simply make it so that the application checks whether the tile next to it is a wall or not and if there isn't a wall next to it then make it so the player can move there...
If you are using smooth normal movement then using the four corner points is more efficient if you are using rectangles that follow the player. Just place a rectangle on the four corners of the player object and if the rectangles are about to intersect another rectangle(let's say the tile's rectangle), then it cannot move that direction.






