All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.lotspiech.poker.strategy.Rules

java.lang.Object
   |
   +----com.lotspiech.poker.strategy.Rules

public class Rules
extends Object
This class represents a list of rules for a strategy.

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 charMask
 o COPYRIGHT
 o hi
 o letters
 o lo
 o rankMask
 o ret
 o ruleNo
 o rules
 o ruleStrings
 o suit
 o suitMask
 o table

Constructor Index

 o Rules()
This method was created in VisualAge.
 o Rules(Reader)
This method was created in VisualAge.
 o Rules(String)
This method was created in VisualAge.

Method Index

 o bestDiscard(HandWithDiscard)
This method was created in VisualAge.
 o compile(String)
This method was created in VisualAge.
 o getIndex(char)
This method was created in VisualAge.
 o getLastRule()
This method was created in VisualAge.
 o main(String[])
This evaluates a strategy versus a given set of rules.
 o setMasks(HandWithDiscard)
This method was created in VisualAge.

Variables

 o COPYRIGHT
 private static final String COPYRIGHT
 o rules
 private Vector rules
 o ruleStrings
 private Vector ruleStrings
 o ruleNo
 private int ruleNo
 o letters
 private String letters
 o table
 private int table[]
 o ret
 byte ret
 o rankMask
 byte rankMask[]
 o suitMask
 byte suitMask[]
 o charMask
 byte charMask[]
 o lo
 int lo
 o hi
 int hi
 o suit
 int suit

Constructors

 o Rules
 protected Rules()
This method was created in VisualAge.

 o Rules
 private Rules(Reader in0) throws IOException, PatternSyntaxException
This method was created in VisualAge.

Parameters:
filename - java.lang.String
 o Rules
 public Rules(String filename) throws IOException, FileNotFoundException, PatternSyntaxException
This method was created in VisualAge.

Parameters:
filename - java.lang.String

Methods

 o bestDiscard
 protected void bestDiscard(HandWithDiscard hand) throws Exception
This method was created in VisualAge.

Parameters:
hand - com.lotspiech.poker.HandWithDiscard
 o compile
 public Pattern compile(String rule) throws PatternSyntaxException
This method was created in VisualAge.

Parameters:
rule - java.lang.String
Returns:
com.lotspiech.poker.strategy.Pattern
 o getIndex
 public int getIndex(char c) throws PatternSyntaxException
This method was created in VisualAge.

Parameters:
c - char
Returns:
int
Throws: PatternSyntaxException
The exception description.
 o getLastRule
 protected String getLastRule()
This method was created in VisualAge.

Returns:
java.lang.String
 o main
 public static void main(String args[]) throws Exception
This evaluates a strategy versus a given set of rules.

Parameters:
args - strategy-file rules-file
 o setMasks
 private void setMasks(HandWithDiscard hand)
This method was created in VisualAge.

Parameters:
hand - com.lotspiech.poker.HandWithDiscard

All Packages  Class Hierarchy  This Package  Previous  Next  Index