Gaaaaaah!

Why not hava a collection of Wall objects. Then you loop over them checking to see if Pacman's co-ords are inside any of the walls. That way your code will not change should you change...