//
//  card.java
//  cribbage
//

public class Card {
	public static final int CLUB = 0;
	public static final int HEART = 1;
	public static final int SPADE = 2;
	public static final int DIAMOND = 3;
	public static final int JACK = 11;
	public static final int QUEEN = 12;
	public static final int KING = 13;
	public static final int ACE = 1;
	
	private int suit;
	private int rank;
	
	// Constructor
	public Card(int suit, int rank) {
		this.suit = suit;
		this.rank = rank;
	}
	
	// Accessors
	public int getSuit() {return suit;}
	public int getRank() {return rank;}
	
	// Testing Display Function
	public String display() {
		String message = "";
		if (rank <= 10 & rank > 1)
			message += (rank+" of ");
		else
			switch (rank) {
				case JACK: message += ("Jack of "); break;
				case QUEEN: message +=("Queen of "); break;
				case KING: message +=("King of "); break;
				case ACE: message +=("Ace of "); break;
			}	

		switch(suit) {
			case CLUB: message +=("Clubs"); break;
			case HEART: message +=("Hearts"); break;
			case SPADE: message +=("Spades"); break;
			case DIAMOND: message +=("Diamonds"); break;
		}
		//System.out.print(message);
		return message;
	}

}
