Bouncing Barney

Barney is in the triangular room shown here. He walks from a point on AC parallel to BC. When he reaches AB, he turns and walks parallel to AC. When he reaches BC, he turns and walks parallel to AB. How many times will Barney reach a wall before returning to his starting point?

(Source: Adapted from Mathematics Teaching in the Middle School)

Extension
What happens if Barney’s first direction is NOT parallel to any of the sides?