From: Mathew B. <vla...@gm...> - 2007-11-13 05:25:55
|
Random thoughts: Well, I did a little work and created a class for creating cards individually. Does there need to be 52 separate objects, one for each card, then? =( Maybe one object for each player's stack would be a more elegant solution, but seems like it would be tough to work with. Maybe even just one object for the whole deck, and each card would be an attribute within the class w/ a value indicating which player's stack it is in and the position within the stack. Hmm. Could be a viable option, and seems like it would be easier to track each card within a single object. Dealing would be reasonably simple, I suppose, alternating between one player to the other evenly, randomly assigning order to each card (shuffling). But how would I go about keeping track of each card as the deck gets shuffled around from player to player, and the order of the card changes as the game progresses? How would the card actually get picked from the stack? I really don't have much of an idea going here. Should have spent some more time before 11:15 on the day before class, I guess. The attachment is my individual card class, with the Ace of Spades belonging to player one, first in the deck, hardcoded. I'm off to bed now, it's tomorrow already. Matt Boban -- (\_/) This is Bunny. (O.o) Copy Bunny into your emails to help (> <) him on his way to world domination. |