Here you go.
10496

I added flags to prevent moving into the walls, and added an instruction to move the square out of the walls if it's overlapping.
I also changed the walls to backdrop objects...