inonit.domain.game.card.hearts
Class Hearts

java.lang.Object
  |
  +--inonit.domain.game.card.hearts.Hearts

public class Hearts
extends java.lang.Object

Root class containing some methods specific to the game of Hearts.


Method Summary
static Hearts get()
          Returns an instance of the Hearts class.
 int getMaximumNumberOfPlayers()
          Returns the maximum number of players permitted for a game of Hearts.
 int getMinimumNumberOfPlayers()
          Returns the minimum number of players necessary for a game of Hearts.
 Rank.Order getRankOrder()
          Returns the Rank.Order which defines which Cards are higher or lower than others in the game of Hearts.
 Rank[] getRanks()
          Returns an array containing the Rank objects typically included in a Hearts deck.
 Suit[] getSuits()
          Returns an array containing the Suit objects representing the suits normally used in Hearts.
 java.lang.String getVersionNumber()
          Returns the installed version of Hearts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static Hearts get()
Returns an instance of the Hearts class.
Returns:
An instance of the Hearts class.

getMinimumNumberOfPlayers

public int getMinimumNumberOfPlayers()
Returns the minimum number of players necessary for a game of Hearts.
Returns:
The minimum number of players supported by Hearts. Currently returns 3.

getMaximumNumberOfPlayers

public int getMaximumNumberOfPlayers()
Returns the maximum number of players permitted for a game of Hearts.
Returns:
The maximum number of players supported by Hearts. Currently returns 7.

getRankOrder

public Rank.Order getRankOrder()
Returns the Rank.Order which defines which Cards are higher or lower than others in the game of Hearts. Equivalent to Rank.Order.ACE_HIGH.
Returns:
A Rank.Order object specifying the high-to-low order of Cards in Hearts.

getSuits

public Suit[] getSuits()
Returns an array containing the Suit objects representing the suits normally used in Hearts.
Returns:
An array containing Suit.HEARTS, Suit.SPADES, Suit.DIAMONDS, and Suit.CLUBS.

getRanks

public Rank[] getRanks()
Returns an array containing the Rank objects typically included in a Hearts deck.
Returns:
An array containing Rank.TWO through Rank.ACE.

getVersionNumber

public java.lang.String getVersionNumber()
Returns the installed version of Hearts.
Returns:
A String describing the version of Hearts; e.g., "1.0 alpha 1"