I can't see a reason why the table object should have a removeCard() method. 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.

Alternately, the table could get the hand - maybe using a getHand() method - 
from the player object and call the removeCard() method on the hand. This 
approach makes the most conceptual sense to me. The table will want to interact 
directly with the hand. Having pass-through methods seems like overkill to me.

Steve

> So long as you are explicitly passing in your components, I think 
> calling methods on those components is the right way to go. 
> 
> I believe I am.  What I am asking is how one calls the methods of 
> components used inside of other components.  Does one HAVE TO create 
> methods in the larger component that then calls the methods of the 
> components that make it up?
> 
> IE.  If my hand object has a removeCard() method, does the player 
> object need a removeCard() method that calls the hand.removeCard() 
> method and does the table object need a removeCard() method that calls 
> the player.removeCard() method that calls the hand.removeCard() method.  
> 
> 
> Is this the way composition is supposed to work?  It just seems a bit 
> much in the way of overhead, but I can not see any other way to do 
> this?
> 
> 
> --------------
> 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:260582
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to