Hi all;
I'm looking to implement some basic collision detection for my pong game. I followed a few basic tutorials on how to create all the classes to write a pong game - I now have a somewhat playable version of the game, which I've flipped the view so instead of the traditional horizontal position, you play in a vertical position so the player paddle is at the bottom of the window and the AI paddle is at the top. I've attached all the files necessary for everything to work. I'm thinking about adding some sort of check in the 'PlayerPaddle' to detect whether the paddle has touched the window boundary on either side and if this has been detected, don't allow the paddle to continue to move out of the window into oblivion.
I'm sure there are experts who know exactly what the problem is and how to remedy this problem. I'm pulling my hair out as this is my last major problem to sort out. I'd like to thank anyone in advance for providing on help on this conundrum. For some reason I can't attach cpp and header files so I've included the following link to all the files:
https://www.dropbox.com/sh/cr04j36vleat56y/sCTKdg0XVH
Any help or advice will be greatly appreciated.
Chilun