Skip to main content
GameDev.net gamedev.net
🔒 Locked

Class Question...

Started by JSCFaith Apr 18, 2001 at 11:41 PM 1 replies 250+ views
Original Post
JSCFaith
JSCFaith
Hey, Well, as you might already know, I am creating a small breakout clone to learn Directx and to improve my use of classes. Well my question is that I have 3 classes: Ball, Paddle, Block. I need to check for collisions. After reading a book on classes it had said that it is not good practice to make the class relie on other parts of the program. So, I am wondering. Should I create funcion called Collision that all the classes relie on? Or should I create a Collision class? Or should I have each class do its own Collision test? Also, I want to add a menu interface to this program. Would you say I should create one class called "Menu" to do this or should I create multipule classes to do different functions? Well, as you can see, I am still not totally sure what the criteria for a class is. I hope to learn this over time, but for now I am still not sure. Well if you can help me out that would be appreciated. Thanks. Edited by - JSCFaith on April 18, 2001 12:45:41 AM
JSCFaith
JSCFaith
Thanks a lot. I am suprised I never thought of that. I am just not used to this class stuff. Well thanks a lot.

Later.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.