When does a ball in a game of brick breaker never hit the remaining breaks?

137 Views Asked by At

I have a block size 2N*2N and some squares are filled with bricks and some aren't. I have a ball that travels distance 1 in the x and y direction and bounces off with perpendicular direction if it hits a boundary or it hits a break. After what time will I know the remaining bricks will never be hit?

1

There are 1 best solutions below

0
On

Assuming that the boundaries of field are a square (which I assume is intended as the dimensions are listed as $2N*2N$), the ball will avoid the bricks indefinitely if it, at some point, makes contact with all four walls without hitting a brick. Because the ball is only moving at 45 degree angles relative to the squares, after making one loop of the square, it will continue to do so forever.

(this is similar to the reasoning of commenter @Cruncher.)