It just needs to call player.removeCard(). Basically, it is just telling the
player to remove a card. It doesn't care how the player does it. The player
would in turn call the removeCard() method of the hand.
BUT!!! How does the table call player.removeCard() method without a method that
does so? That is what I'm stumbling on. There just seems to me that there
should be something with composition that the methods of the internal object
should be available. So that one can go something like
table.player.hand.removeCard() or something along those lines.
The only way I see doing this, which I guess is the way one is supposed to do
this, but it seems unnatural to me.
So this is the basic and incomplete idea I am currently working with.
aCard = table.getCard(1);
Table.cfc
---------
getCard
{
return players[argument.player].getCard(1);
}
Player.cfc
getCard
{
return hand.getCard(argument.card);
}
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
---------
| 1 | |
--------- Binary Soduko
| | |
---------
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260586
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4