All Packages Class Hierarchy This Package Previous Next Index
Class com.lotspiech.poker.Machine
java.lang.Object
|
+----com.lotspiech.poker.Machine
- public class Machine
- extends Object
- implements Serializable
This class represents a single style of a video poker machine, including
its payoff table. For example, an "8/5" jacks-or-better machine without be
a different instantiation of Machine than an "9/6" version.
Copyright 2001, 2002 by Jeffrey B. Lotspiech. This program is open source;
it is licensed under the Common Public License Version 0.5.
- Author:
- Jeffrey B. Lotspiech
-
COPYRIGHT
-
-
decksize
-
-
lastPayoff
-
-
name
-
-
payoffDictionary
-
-
payoffs
-
-
serialVersionUID
-
-
wilds
-
-
Machine(String, int, int)
-
-
addPayoff(String, int, String, int, int)
-
-
bestDiscard(HandWithDiscard)
- This method was created in VisualAge.
-
getCoinChances(Hand, Deck)
- This method was created in VisualAge.
-
getCoinChances(Hand, Deck, int)
-
-
getDecksize()
- This method was created in VisualAge.
-
getLastPayoffIndex()
- This returns the index of the last payoff
from a getCoinChances.
-
getName()
-
-
getPayoff(String)
- This method was created by a SmartGuide.
-
getPayoffTable()
- This returns the payoff table.
-
getReturn()
-
-
getReturn(Hand, Deck)
- This method was created in VisualAge.
-
getReturn(Hand, Deck, int)
- This method was created in VisualAge.
-
getReturn(HandWithDiscard)
- This method was created in VisualAge.
-
getReturn(HandWithDiscard, int)
- This method was created in VisualAge.
-
getShuffledDeck()
-
-
makeHand(Card[])
- This method was created in VisualAge.
-
resetCounts()
-
-
toString()
-
-
toString(int)
-
COPYRIGHT
private static final String COPYRIGHT
serialVersionUID
public static final long serialVersionUID
name
private String name
payoffDictionary
private Dictionary payoffDictionary
payoffs
private Vector payoffs
decksize
private int decksize
wilds
private int wilds
lastPayoff
private Payoff lastPayoff
Machine
public Machine(String name,
int decksize,
int wilds)
addPayoff
public void addPayoff(String name,
int multiple,
String type,
int begin,
int n) throws Exception
bestDiscard
public HandWithDiscard bestDiscard(HandWithDiscard hand) throws Exception
- This method was created in VisualAge.
- Returns:
- com.lotspiech.poker.Discard
getCoinChances
public int getCoinChances(Hand hand,
Deck deck) throws Exception
- This method was created in VisualAge.
- Parameters:
- hand - com.lotspiech.poker.Hand
- deck - com.lotspiech.poker.Deck
- Returns:
- int
getCoinChances
public int getCoinChances(Hand hand,
Deck deck,
int count) throws Exception
getDecksize
public int getDecksize()
- This method was created in VisualAge.
- Returns:
- int
getLastPayoffIndex
public int getLastPayoffIndex()
- This returns the index of the last payoff
from a getCoinChances.
- Returns:
- int
getName
public String getName()
getPayoff
public Payoff getPayoff(String name)
- This method was created by a SmartGuide.
- Parameters:
- name - java.lang.String
- Returns:
- com.lotspiech.poker.Payoff
getPayoffTable
public TableModel getPayoffTable()
- This returns the payoff table.
- Returns:
- java.util.Enumeration
getReturn
public double getReturn()
getReturn
public double getReturn(Hand hand,
Deck deck) throws Exception
- This method was created in VisualAge.
- Parameters:
- hand - com.lotspiech.poker.Hand
- deck - com.lotspiech.poker.Deck
- Returns:
- double
getReturn
public double getReturn(Hand hand,
Deck deck,
int count) throws Exception
- This method was created in VisualAge.
- Parameters:
- hand - com.lotspiech.poker.Hand
- deck - com.lotspiech.poker.Deck
- Returns:
- double
getReturn
public double getReturn(HandWithDiscard hand) throws Exception
- This method was created in VisualAge.
- Parameters:
- hand - com.lotspiech.poker.Hand
- Returns:
- double
getReturn
public double getReturn(HandWithDiscard hand,
int count) throws Exception
- This method was created in VisualAge.
- Parameters:
- hand - com.lotspiech.poker.Hand
- Returns:
- double
getShuffledDeck
public Deck getShuffledDeck()
makeHand
public HandWithDiscard makeHand(Card cards[])
- This method was created in VisualAge.
- Parameters:
- cards - com.lotspiech.poker.Card[]
- Returns:
- com.lotspiech.poker.HandWithDiscard
resetCounts
public void resetCounts()
toString
public String toString()
- Overrides:
- toString in class Object
toString
public String toString(int denom)
All Packages Class Hierarchy This Package Previous Next Index