/**
 * @author Yoshihiro Fujio
 * CS239 section 2
 * PA2
 * V1 date 2007/03/11
**/
/*****************************************************************
 * Rank.java
 *
 * Represents the available value of cards and their points 
 ***************************************************************/
public class Card
{
	Rank rank; // value of cards
	Suit suit; // symbol of cards
	
   /**********************************************************
    * Create a new cards with the given attributes.
    * @param rank The values of cards
    * @param suit The symbol of cards
    **********************************************************/
   public Card (Rank rank, Suit suit)
   {  
		this.rank = rank;
		this.suit = suit;
   } // end Cards
	
   /******************************************************
    * Returns the points of the card
    * @return point of cards
    ******************************************************/
   public int getPoints()
   {
      return rank.getPoints();
   } // end getPoints
	
   /*********************************************************
    * The string of rank and suit
    * @return The String of rank followed by suit
    ********************************************************/
   public String toString ()
   {
		String rankAndSuit;

		rankAndSuit = String.format("%s of %s", rank.toString(), suit.toString());
		
		return rankAndSuit;
   } // end toString
} // end class