001: package poker.data.game;
002:
003: import java.util.Vector;
004:
005: /**
006: *
007: * EnhyDraw!, beta 4, 5/21/99
008: *
009: * Copyright 1999, Larry Wolcot & Daryl Tempesta
010: * ALL rights reserved. Not for commercial use
011: * without written permission from both authors.
012: *
013: * Forgive the lack of docs and CR's in the Data Objects.
014: * I don't have a lot of time for this project, and this
015: * should be easy enough to figure out
016: */
017: public class PokerGameDO implements java.io.Serializable {
018: private int cash = 0;
019: private int playRound = 0;
020: private String id = "";
021: private int bet = 0;
022: private int largestBet = 0;
023: private int smallestBet = 0;
024: private int totalPlayed = 0;
025: private int totalWon = 0;
026: private int defaultBet = 100;
027: private String deck = "deck1";
028: private Vector cardsInHand = new Vector(5);
029: private Vector cardsUsed = new Vector(0);
030: private Vector dropCards = new Vector(0);
031: private String lastError = "";
032: private int version = 0;
033:
034: /**
035: * Basic Constructor
036: */
037: public PokerGameDO(String id, int cash) {
038: this .id = id;
039: this .cash = cash;
040: String drop = "DROP";
041: for (int i = 0; i < 5; i++) {
042: dropCards.addElement(drop);
043: }
044: }
045:
046: //basic "SET" encapsulation methods for this object.
047: public void setCash(int cash) {
048: this .cash = cash;
049: }
050:
051: public void setVersion(int version) {
052: this .version = version;
053: }
054:
055: public void setPlayRound(int playRound) {
056: this .playRound = playRound;
057: }
058:
059: public void setID(String id) {
060: this .id = id;
061: }
062:
063: public void setBet(int bet) {
064: this .bet = bet;
065: }
066:
067: public void setLargestBet(int large) {
068: this .largestBet = large;
069: }
070:
071: public void setSmallestBet(int small) {
072: this .smallestBet = small;
073: }
074:
075: public void setTotalPlayed(int total) {
076: this .totalPlayed = total;
077: }
078:
079: public void setTotalWon(int total) {
080: this .totalWon = total;
081: }
082:
083: public void setCardsInHand(Vector cih) {
084: this .cardsInHand = cih;
085: }
086:
087: public void setCardsUsed(Vector cu) {
088: this .cardsUsed = cu;
089: }
090:
091: public void setDropCards(Vector dc) {
092: this .dropCards = dc;
093: }
094:
095: public void setDeck(String deck) {
096: this .deck = deck;
097: }
098:
099: public void setDefaultBet(int db) {
100: this .defaultBet = db;
101: }
102:
103: public void setLastError(String le) {
104: this .lastError = le;
105: }
106:
107: //basic "GET" encapsulation methods for this object.
108: public int getCash() {
109: return cash;
110: }
111:
112: public int getVersion() {
113: return version;
114: }
115:
116: public int getPlayRound() {
117: return playRound;
118: }
119:
120: public String getLastError() {
121: return lastError;
122: }
123:
124: public String getID() {
125: return id;
126: }
127:
128: public int getBet() {
129: return bet;
130: }
131:
132: public int getLargestBet() {
133: return largestBet;
134: }
135:
136: public int getSmallestBet() {
137: return smallestBet;
138: }
139:
140: public int getTotalPlayed() {
141: return totalPlayed;
142: }
143:
144: public int getTotalWon() {
145: return totalWon;
146: }
147:
148: public Vector getCardsInHand() {
149: return cardsInHand;
150: }
151:
152: public Vector getCardsUsed() {
153: return cardsUsed;
154: }
155:
156: public Vector getDropCards() {
157: return dropCards;
158: }
159:
160: public int getDefaultBet() {
161: return defaultBet;
162: }
163:
164: public String getDeck() {
165: return deck;
166: }
167: }
|