/*so far, calss has:  makeDeck
		      isEquealTo
		      comapreValue

it needs: deal
	  discard \
		    trade?
	  pickup  /

perhaps we could make a Golfgame class...an instance for each game
we could make a bunch of game classes each having methods specific to the 
game...interesting..
and all could inherit cards....
*/	
package Golf;

import java.util.*;

class Card
{
	int value;
	char suit;
	int points;//point value, depends on the game being played (EX K = 13, A = 1 0r 14 ect)
	int number;
	static Vector deck = new Vector(53); //deck of cards, used in the 

	
	//createDeck method
	//constructors
	
	//defalut
	public Card()
	{
		value = 0;
		suit = 'H';
		points = 0;
		number = 0;
		// initialise vector?
	}

//************************| METHODS |****************************************
	
	//getters and setters
	
	//getters

	public int getValue()
	{
		return this.value;
	}
	
	public int getPoints()
	{
		return this.points;
	}

	public int getNumber()
	{
		return this.number;
	}
	
	public char getSuit()
	{
		return this.suit;
	}
	
	//setters

	public void setValue(int v)
	{
		this.value = v;
	}
	
	public void setPoints(int p)
	{
		this.points = p;
	}
	
	public void setNumber(int n)
	{
		this.number = n;
	}

	public void setSuit(char s)
	{
		this.suit = s;
	}
	//end of setters and getters

	// isEquealTO compares 2 cards and returns a 0 if the 
	// values and suit are the same, a -1 if the values are 
	// the same and the suit is diffrent, a -2 
	// if the values are diffrent and the suit is the same.
	// and a -3 if both the values and suit are difrrent
	
	
	public int isEquealTo(Card b)
	{
		int same = 0;

		if ((this.value == b.value) && (this.suit == b.suit))
		{
			same = 0;
		}

		else if ((this.value == b.value) && (this.suit != b.suit))
		{
			same = -1;
		}

		else if ((this.value != b.value) && (this.suit == b.suit))
		{
			same = -2;
		}

		else if ((this.value != b.value) && (this.suit != b.suit))
		{
			same = -3;
		}
		
		return same;
	}
	
	// compareValue compares the vlaues of 2 cards 
	// use after isEquealTo to see if this.values is 
	// greater(1) equeal(0) or less than(-1) the argument  
	
	public int compareValue(int a)
	{
		int ans;		

		if (this.value == a)
		{
			ans = 0;
		}
		else if (this.value > a)
		{
			ans = 1;
		}
		else
		{
			ans = -1;
		}
		
		return ans;
	}





	
	
	}

