// // AHF 10/31/2002 // // Poker server communication // // Tells client that it is time for the user to bet // import java.util.*; import java.lang.*; import java.rmi.*; import java.net.*; class BetReturnMessage extends ReturnMessage { int min_bet; public BetReturnMessage(int bet) { min_bet = bet; }; void service(PokerClient pk){ if(pk.quit_request) { // The player has asked to quit the game, so we will fold // now automatically and tell the system that we are quitting try{ pk.gs.fold(pk.id, true); }catch(RemoteException e){ System.exit(1); }; }else{ // Indicates that the user may now make a bet pk.bet_now = true; // Remember what the minimum bet is pk.min_bet = min_bet; // Ask the user to bet System.out.println("Please bet now. The minimum bet is " + min_bet); }; }; };