1 package poker.business; 2 3 import poker.data.user.*; 4 import poker.data.game.*; 5 import java.util.Vector ; 6 import poker.spec.user.PlayerDO; 7 import poker.spec.*; 8 9 21 public class PokerGameImpl implements PokerGame,java.io.Serializable { 22 23 private boolean isDirty = false; 24 private PokerGameDO pokerGameDO; 25 private PlayerDO playerDO; 26 27 30 public PokerGameImpl(){}; 31 32 public PokerGameImpl(String name,String pw,String id,int cash){ 33 playerDO = new PlayerDOImpl(name, pw); 34 pokerGameDO = new PokerGameDO(id, cash); 35 } 36 37 40 public PokerGameDO getPokerGameDO(){ 41 return pokerGameDO; 42 } 43 44 47 public String getName(){ 48 return playerDO.getName(); 49 } 50 51 54 public boolean getIsDirty(){ 55 return this.isDirty; 56 } 57 58 61 public String getEmail(){ 62 return playerDO.getEmail(); 63 } 64 65 68 public String getPassword(){ 69 return playerDO.getPassword(); 70 } 71 72 75 public int getCash(){ 76 return pokerGameDO.getCash(); 77 } 78 79 82 public int getPlayRound(){ 83 return pokerGameDO.getPlayRound(); 84 } 85 86 87 90 public String getID(){ 91 return pokerGameDO.getID(); 92 } 93 94 97 public int getBet(){ 98 return pokerGameDO.getBet(); 99 } 100 101 104 public int getVersion(){ 105 return pokerGameDO.getVersion(); 106 } 107 108 111 public int getLargestBet(){ 112 return pokerGameDO.getLargestBet(); 113 } 114 115 118 public int getSmallestBet(){ 119 return pokerGameDO.getSmallestBet(); 120 } 121 122 125 public int getTotalPlayed(){ 126 return pokerGameDO.getTotalPlayed(); 127 } 128 129 132 public int getTotalWon(){ 133 return pokerGameDO.getTotalWon(); 134 } 135 136 139 public Vector getCardsInHand(){ 140 return pokerGameDO.getCardsInHand(); 141 } 142 143 146 public Vector getCardsUsed(){ 147 return pokerGameDO.getCardsUsed(); 148 } 149 150 153 public int getDefaultBet(){ 154 return pokerGameDO.getDefaultBet(); 155 } 156 157 160 public Vector getDropCards(){ 161 return pokerGameDO.getDropCards(); 162 } 163 164 167 public String getDeck(){ 168 return pokerGameDO.getDeck(); 169 } 170 171 175 public String getLastError(){ 176 return pokerGameDO.getLastError(); 177 } 178 179 184 public PlayerDO getPlayer(){ return playerDO; } 185 186 189 public void setCash(int cash){ 190 this.isDirty = true; 191 pokerGameDO.setCash(cash); 192 } 193 194 197 public void setPlayRound(int playRound){ 198 this.isDirty = true; 199 pokerGameDO.setPlayRound(playRound); 200 } 201 202 205 public void setLastError(String lastError){ 206 this.isDirty = true; 207 pokerGameDO.setLastError(lastError); 208 } 209 210 213 public void setID(String id){ 214 this.isDirty = true; 215 pokerGameDO.setID(id); 216 } 217 218 221 public void setName(String name){ 222 this.isDirty = true; 223 playerDO.setName(name); 224 } 225 226 229 public void setPassword(String pw){ 230 this.isDirty = true; 231 playerDO.setPassword(pw); 232 } 233 234 237 public void setEmail(String email){ 238 this.isDirty = true; 239 playerDO.setEmail(email); 240 } 241 242 243 246 public void setBet(int bet){ 247 this.isDirty = true; 248 pokerGameDO.setBet(bet); 249 } 250 251 254 public void setVersion(int version){ 255 this.isDirty = true; 256 pokerGameDO.setVersion(version); 257 } 258 259 262 public void setLargestBet(int largestBet){ 263 this.isDirty = true; 264 pokerGameDO.setLargestBet(largestBet); 265 } 266 267 270 public void setSmallestBet(int smallestBet){ 271 this.isDirty = true; 272 pokerGameDO.setSmallestBet(smallestBet); 273 } 274 275 278 public void setTotalPlayed(int totalPlayed){ 279 this.isDirty = true; 280 pokerGameDO.setTotalPlayed(totalPlayed); 281 } 282 283 286 public void setTotalWon(int totalWon){ 287 this.isDirty = true; 288 pokerGameDO.setTotalWon(totalWon); 289 } 290 291 294 public void setCardsInHand(Vector cardsInHand){ 295 pokerGameDO.setCardsInHand(cardsInHand); 296 } 297 298 301 public void setCardsUsed(Vector cardsUsed){ 302 pokerGameDO.setCardsUsed(cardsUsed); 303 } 304 305 308 public void setDropCards(Vector dropCards){ 309 pokerGameDO.setDropCards(dropCards); 310 } 311 312 315 public void setDeck(String deck){ 316 this.isDirty = true; 317 pokerGameDO.setDeck(deck); 318 } 319 320 323 public void setDefaultBet(int defaultBet){ 324 this.isDirty = true; 325 pokerGameDO.setDefaultBet(defaultBet); 326 } 327 328 } 329 | Popular Tags |