1 package poker.data.game; 2 3 4 import java.util.Vector ; 5 6 18 public class PokerGameDO implements java.io.Serializable { 19 private int cash = 0; 20 private int playRound = 0; 21 private String id = ""; 22 private int bet = 0; 23 private int largestBet = 0; 24 private int smallestBet = 0; 25 private int totalPlayed = 0; 26 private int totalWon = 0; 27 private int defaultBet = 100; 28 private String deck = "deck1"; 29 private Vector cardsInHand = new Vector (5); 30 private Vector cardsUsed = new Vector (0); 31 private Vector dropCards = new Vector (0); 32 private String lastError = ""; 33 private int version = 0; 34 35 38 public PokerGameDO(String id, int cash){ 39 this.id = id; 40 this.cash = cash; 41 String drop = "DROP"; 42 for (int i=0; i < 5; i++){ 43 dropCards.addElement(drop); 44 } 45 } 46 47 public void setCash(int cash){ this.cash = cash; } 49 public void setVersion(int version){ this.version = version; } 50 public void setPlayRound(int playRound){ this.playRound = playRound; } 51 public void setID(String id){ this.id = id; } 52 public void setBet(int bet){ this.bet = bet; } 53 public void setLargestBet(int large){ this.largestBet = large;} 54 public void setSmallestBet(int small){ this.smallestBet = small;} 55 public void setTotalPlayed(int total){ this.totalPlayed = total;} 56 public void setTotalWon(int total){ this.totalWon = total; } 57 public void setCardsInHand(Vector cih){ this.cardsInHand = cih; } 58 public void setCardsUsed(Vector cu){ this.cardsUsed = cu; } 59 public void setDropCards(Vector dc){ this.dropCards = dc; } 60 public void setDeck(String deck){ this.deck = deck; } 61 public void setDefaultBet(int db){ this.defaultBet = db;} 62 public void setLastError(String le){ this.lastError = le; } 63 64 public int getCash(){ return cash; } 66 public int getVersion(){ return version; } 67 public int getPlayRound(){ return playRound; } 68 public String getLastError(){ return lastError; } 69 public String getID(){ return id; } 70 public int getBet(){ return bet; } 71 public int getLargestBet(){ return largestBet; } 72 public int getSmallestBet(){ return smallestBet; } 73 public int getTotalPlayed(){ return totalPlayed; } 74 public int getTotalWon(){ return totalWon; } 75 public Vector getCardsInHand(){ return cardsInHand; } 76 public Vector getCardsUsed(){ return cardsUsed; } 77 public Vector getDropCards(){ return dropCards; } 78 public int getDefaultBet(){ return defaultBet; } 79 public String getDeck(){ return deck; } 80 } 81 | Popular Tags |