It sounds like you need to separate your logic out. If you had 3 methods, one for contacting a puck, one for the goal and one for the walls, you could then differentiate and code what specific things need to happen (playing a sound, coloring a wall) based on the event. But the collision detection should be similar in all cases.