Posted on 2005-03-24
im having some trouble with class programming.
im trying to create a poker simulator, so ill use that as an example.
i have the table class, clsTable, which calls other classes like clsDealer, and clsPlayer
the problem that im having is i have trouple manipulating data between classes, like when i want to deal cards. the deal() function is held under the Dealer class, but it gives cards to the Player class
so all in all, the player class does not know that the dealer class exists, and visa versa. obviously i cant create a new player class under the dealer class, becuase that will be a different instance than when i initially created it in the table class.
i can post code, but i think this can be solved without it. let me know, and thanks in advance.