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

Variable Index

 o COPYRIGHT
 o decksize
 o lastPayoff
 o name
 o payoffDictionary
 o payoffs
 o serialVersionUID
 o wilds

Constructor Index

 o Machine(String, int, int)

Method Index

 o addPayoff(String, int, String, int, int)
 o bestDiscard(HandWithDiscard)
This method was created in VisualAge.
 o getCoinChances(Hand, Deck)
This method was created in VisualAge.
 o getCoinChances(Hand, Deck, int)
 o getDecksize()
This method was created in VisualAge.
 o getLastPayoffIndex()
This returns the index of the last payoff from a getCoinChances.
 o getName()
 o getPayoff(String)
This method was created by a SmartGuide.
 o getPayoffTable()
This returns the payoff table.
 o getReturn()
 o getReturn(Hand, Deck)
This method was created in VisualAge.
 o getReturn(Hand, Deck, int)
This method was created in VisualAge.
 o getReturn(HandWithDiscard)
This method was created in VisualAge.
 o getReturn(HandWithDiscard, int)
This method was created in VisualAge.
 o getShuffledDeck()
 o makeHand(Card[])
This method was created in VisualAge.
 o resetCounts()
 o toString()
 o toString(int)

Variables

 o COPYRIGHT
 private static final String COPYRIGHT
 o serialVersionUID
 public static final long serialVersionUID
 o name
 private String name
 o payoffDictionary
 private Dictionary payoffDictionary
 o payoffs
 private Vector payoffs
 o decksize
 private int decksize
 o wilds
 private int wilds
 o lastPayoff
 private Payoff lastPayoff

Constructors

 o Machine
 public Machine(String name,
                int decksize,
                int wilds)

Methods

 o addPayoff
 public void addPayoff(String name,
                       int multiple,
                       String type,
                       int begin,
                       int n) throws Exception
 o bestDiscard
 public HandWithDiscard bestDiscard(HandWithDiscard hand) throws Exception
This method was created in VisualAge.

Returns:
com.lotspiech.poker.Discard
 o 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
 o getCoinChances
 public int getCoinChances(Hand hand,
                           Deck deck,
                           int count) throws Exception
 o getDecksize
 public int getDecksize()
This method was created in VisualAge.

Returns:
int
 o getLastPayoffIndex
 public int getLastPayoffIndex()
This returns the index of the last payoff from a getCoinChances.

Returns:
int
 o getName
 public String getName()
 o getPayoff
 public Payoff getPayoff(String name)
This method was created by a SmartGuide.

Parameters:
name - java.lang.String
Returns:
com.lotspiech.poker.Payoff
 o getPayoffTable
 public TableModel getPayoffTable()
This returns the payoff table.

Returns:
java.util.Enumeration
 o getReturn
 public double getReturn()
 o 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
 o 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
 o getReturn
 public double getReturn(HandWithDiscard hand) throws Exception
This method was created in VisualAge.

Parameters:
hand - com.lotspiech.poker.Hand
Returns:
double
 o getReturn
 public double getReturn(HandWithDiscard hand,
                         int count) throws Exception
This method was created in VisualAge.

Parameters:
hand - com.lotspiech.poker.Hand
Returns:
double
 o getShuffledDeck
 public Deck getShuffledDeck()
 o makeHand
 public HandWithDiscard makeHand(Card cards[])
This method was created in VisualAge.

Parameters:
cards - com.lotspiech.poker.Card[]
Returns:
com.lotspiech.poker.HandWithDiscard
 o resetCounts
 public void resetCounts()
 o toString
 public String toString()
Overrides:
toString in class Object
 o toString
 public String toString(int denom)

All Packages  Class Hierarchy  This Package  Previous  Next  Index