bot.module.th.shc
Class TableCSV

java.lang.Object
  extended by bot.module.th.shc.StartingHandChart
      extended by bot.module.th.shc.TableCSV
All Implemented Interfaces:
IF_GetProposal, IF_StartingHandChart

public class TableCSV
extends StartingHandChart

CSV startinghandchart
custom table by importing own csv file

Author:
Witthold/Korol

Field Summary
(package private)  int[][][][] csvArr
          helper Array to store csv data temporary - card rows * numPosition * numCalls * numRaises
private static java.lang.String csvPath
           
private static int numCalls
          table offers 0-4 Calls
private static int numPosition
          table wants the 5 standard position classes 0-4
private static int numRaises
          table offers 0-3 Raises
 
Fields inherited from class bot.module.th.shc.StartingHandChart
rank, suite, table
 
Constructor Summary
TableCSV(java.lang.String csvDat)
          Constructor calls super of StartingHandChart
 
Method Summary
private  int betStringToInt(java.lang.String s)
          converts csv's String to int
private  void createTable()
          fills the table in defined order from helperArray
private  void fixTable()
          correct priority of raises over calls into table
private  int[][][][] importCSV(java.lang.String csvDat)
          parses csv file
 
Methods inherited from class bot.module.th.shc.StartingHandChart
getProposal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

csvPath

private static final java.lang.String csvPath
See Also:
Constant Field Values

numPosition

private static final int numPosition
table wants the 5 standard position classes 0-4

See Also:
Constant Field Values

numCalls

private static final int numCalls
table offers 0-4 Calls

See Also:
Constant Field Values

numRaises

private static final int numRaises
table offers 0-3 Raises

See Also:
Constant Field Values

csvArr

int[][][][] csvArr
helper Array to store csv data temporary - card rows * numPosition * numCalls * numRaises

Constructor Detail

TableCSV

public TableCSV(java.lang.String csvDat)
Constructor calls super of StartingHandChart

Parameters:
csvDat - - myTable.csv
Method Detail

importCSV

private int[][][][] importCSV(java.lang.String csvDat)
parses csv file

Parameters:
csv_dat - - myTable.csv
Returns:
int[][][][] - helper Array to store csv data temporary - card rows * (position*numCalls*numRaises)

betStringToInt

private int betStringToInt(java.lang.String s)
converts csv's String to int

Parameters:
s - - String from csv (e.g. "RAISE4")
Returns:
appropriate int representation, a "NA"/"-2" should not appear by getBet()

createTable

private void createTable()
fills the table in defined order from helperArray


fixTable

private void fixTable()
correct priority of raises over calls into table