Well, I don't know if the way you made it allow it, but making the tiles registering the nearby walls might do the trick, so the objects could know if for example, the north wall is blocked but not the south one, etc.
This might even give you some opportunities of gameplay like one-sided walls which allows you to pass but don't come back, or something like this ^^
Also, I forgot to say I liked the way you made the player able to run fast and crash against walls when the forward input is kept pressed xD