Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: How Simple Is Simple?
|
Posted: Oct 16, 2003 7:11 PM
|
|
I guess another question here is "can tokens exist apart from players?" If not, then Kishori's suggestion should be right on the mark.
If so, then it is a different story, but even so, let's imagine the tokens are cards. In this case, each token should exist only in one place; it starts out in the deck and then is given to a player. That player might give it to another, or put it in a trick, or wherever, but the token needn't be in more than one collection at once. Now, continuing with the card analogy, if the game is something like "go fish," then for each token, it has three "equivalent" tokens, but they are not the same token. In other words, it seems you might have a multiton (say 52) of tokens, each being unique. So, while a player may say "do you have a duece" what they are really asking is whether you have any one of the four cards that has that value. If you have several collections, like the deck, the discard pile, players' hands and so on, you just make sure that you are always moving the token from one to another, not just copying its reference.
This would be modelling it like it is actually played. Of course, if you wanted to find a particular token, you might have a somewhat less efficient route (ask the dealer, ask each player, look on the table, under the table, in the window sill...), then if you kept them all in a collection, but you could add that optimization later, if it was really a problem.
|
|