Moved rematch handling up the hierarchy, made Card constructor public in order to create specific cards for searching, etc.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3474 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2005-04-13 01:15:43 +00:00
parent 259870ee81
commit d2b4be178a
7 changed files with 136 additions and 12 deletions
@@ -39,6 +39,17 @@ public class Card implements DSet.Entry, Comparable, CardCodes
public Card ()
{}
/**
* Creates a new card.
*
* @param number the number of the card
* @param suit the suit of the card
*/
public Card (int number, int suit)
{
_value = (byte)((suit << 5) | number);
}
/**
* Returns the value of the card, either from 2 to 11 or
* KING, QUEEN, JACK, ACE, RED_JOKER, or BLACK_JOKER.
@@ -225,17 +236,6 @@ public class Card implements DSet.Entry, Comparable, CardCodes
}
}
/**
* Protected constructor for Deck.
*
* @param number the number of the card
* @param suit the suit of the card
*/
protected Card (int number, int suit)
{
_value = (byte)((suit << 5) | number);
}
/** The number of the card. */
protected byte _value;