CLASSES

Started by
1 comment, last by neobie 19 years, 10 months ago
when making a game of tic tac toe, is the whole game a CLASS, and the player and board objects? or is the board a class, and player another class.
Your sound card works perfectly.
Advertisement
Thats a rather vague question.... But I guess it would depend on how complex you wanted a game of "tic tac toe" to be code wise.

I''d normally break something like this into support classes first and go from there (EG: A drawing class for the peices and board then the peices themselfs, and so on)


-Nate
"Always forgive your enemies, nothing annoys them more.."
Usually the class is the definition, and an object is a variable (of type yourclass).
You should think of data when making OO designs, define what variables (members) and data you need, and combine them into a class with some methods to handle that data.
You can make the board a class, and the game a class with the board as one of its members.

This topic is closed to new replies.

Advertisement