// // AHF 10/31/2002 // // Player state as maintained by the server. This is a sub object of the // game server // import java.util.*; import java.lang.*; class Player { String name; // Name of the user CardSet hand; // Current hand of the player int state; boolean request_quit; // A request has been received from the client to // quit the game. // state = 0 Player is waiting for game to start // state = 1 Player is playing game // state = -1 Player is defunct (and will never return) int money; // Current holdings int total_bet; // Total that has been bet for the ongoing game int current_bet; // Current amount that has been bet for this round ArrayList messages; // The set of outgoing messages to Player. // These are pulled off by the GameServer's // getMessage() method GregorianCalendar cal; // Use this to know how long it has been since // the last message read public Player(String nm){ name = nm; hand = new CardSet(); state = 0; // Waiting state money = 100; // Initial holdings messages = new ArrayList(); request_quit = false; cal = new GregorianCalendar(); }; };