package boondock.holdem.Server; /** * Class of side bets for players going All In. Stores all their pertantent info. * * @author Jonathan O'Keefe * @author Scott Semonian * @author Matt Brinza * @author Hamid R. Tahsildoost * * @author The Boondock Saints * @author No Limit Texas Holdem */ public class sidePot { int amount = 0; int[] players = new int[8]; int next = 0; int[] temp = new int[8]; /** * Initializes side pot (empty) * */ public sidePot(){ for(int p = 0; p<8; p++){ players[p] = -1; } } /** * Initializes side pot * * @param a initializes amount of side pot */ public sidePot(int a) { for(int p = 0; p<8; p++){ players[p] = -1; } amount = a; } /** * Retrieves the side pot * * @return amount Amount of side pot is return */ public int getSidePot() { return amount; } public void setSidePot(int a) { amount = a; } public void addToSidePot(int add) { //System.out.println("adding amount " + add); amount += add; } public void setInSidePot(int indexOfPlayer){ if (notAlreadyIn(indexOfPlayer)){ //System.out.println("adding player at index: " + indexOfPlayer); players[next] = indexOfPlayer; next +=1; } } private boolean notAlreadyIn(int val){ for(int x = 0; x