I’m trying to design a simple game —Pong, Arkanoid— using strictly ‘Proper OO’, whatever that means.
So, by designing myself to death, I’m trying to get to a point where I’ll know what to do or not do next time…
Who should handle, for example, colissions? And scorekeeping?
My first idea was giving a couple jobs to the ball, but that started expanding exponentially into a god object: The ball’d know where it is, who it crashed into, and report to the scorekeeping objects.
And that’s too much for the poor ball.
rule of thumb:
in your case, the ‘gameboard’ or ‘game environment’ would probably have a ‘game physics’ class (or group of methods) that owned the collision-detection (utility/bridge) methods