/**
 * @author Yoshihiro Fujio
 * CS239 section 2
 * PA2
 * V1 date 2007/03/11
**/
/**********************************************************************
 * Player.java
 *
 * Represents a cards hold by each player
 ********************************************************************/

public class Player
{
	private String name;
	private BridgeHand hand;
	
   /**********************************************************
    * Create a new player with its name and hand
    * @param name The name of player
    * @param hand The hand of player
    **********************************************************/
   public Player (String name, BridgeHand hand)
   {  
		this.name = name;
		this.hand = hand;
   } // end Cards
	
   /******************************************************
    * Returns the name of Player
    * @return name of player
    ******************************************************/
   public String getName()
   {	
      return name;
   } // end getName
	
   /******************************************************
    * Returns the cards in hand
    * @return cards in hand
    ******************************************************/
   public BridgeHand getHand()
   {	
      return hand;
   } // end getHand
	
   /*********************************************************
    * The string of name and the total
    * @return The name of player and the total points
    ********************************************************/
   public String toString ()
   {
		String result;
		
		result = getName() + ": \n" + getHand() + "\n" + hand.evaluateHand() + " Points\n";
		
		return result;
   } // end toString	
} // end class