From: Richard W. <rwa...@us...> - 2007-02-24 04:22:28
|
Update of /cvsroot/jogre/jogre/games/texasHoldEm/src/org/jogre/texasHoldEm/server In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1707/games/texasHoldEm/src/org/jogre/texasHoldEm/server Added Files: TexasHoldEmServerController.java TexasHoldEmServerModel.java Log Message: Initial Checkin of Texas Hold'em Game. --- NEW FILE: TexasHoldEmServerController.java --- /* * JOGRE (Java Online Gaming Real-time Engine) - TexasHoldEm * Copyright (C) 2007 Richard Walter (rwa...@ya...) and * Bob Marks (mar...@ya...) * http://jogre.sourceforge.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.jogre.texasHoldEm.server; import nanoxml.XMLElement; import org.jogre.common.Table; import org.jogre.common.IGameOver; import org.jogre.common.JogreModel; import org.jogre.common.comm.CommGameOver; import org.jogre.common.util.JogreUtils; import org.jogre.texasHoldEm.common.TexasHoldEmCoreModel; import org.jogre.texasHoldEm.common.CommTexasHoldEmMakeMove; import org.jogre.server.ServerConnectionThread; import org.jogre.server.ServerController; /** * Server controller for the game TexasHoldEm * * @author Richard Walter * @version Alpha 0.2.3 */ public class TexasHoldEmServerController extends ServerController { /** * Constructor to create a TexasHoldEm controller. * * @param gameKey Game key. */ public TexasHoldEmServerController (String gameKey) { super (gameKey); } /** * Create a new model when the game starts. * * @see org.jogre.server.ServerController#startGame(int) */ public void startGame (int tableNum) { Table theTable = getTable(tableNum); int numPlayers = theTable.getNumOfPlayers(); int initialBankroll = Integer.parseInt(theTable.getProperty("initialBankroll")); setModel (tableNum, new TexasHoldEmServerModel (numPlayers)); } /** * Verify that the game is over. * (A client has just told us that the game is over, but we ought to verify it) * * @see org.jogre.server.ServerController#gameOver(org.jogre.server.ServerConnectionThread, int, int) */ public void gameOver (ServerConnectionThread conn, int tableNum, int resultType) { } } --- NEW FILE: TexasHoldEmServerModel.java --- /* * JOGRE (Java Online Gaming Real-time Engine) - TexasHoldEm * Copyright (C) 2007 Richard Walter (rwa...@ya...) and * Bob Marks (mar...@ya...) * http://jogre.sourceforge.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.jogre.texasHoldEm.server; import nanoxml.XMLElement; import org.jogre.common.JogreModel; import org.jogre.common.TransmissionException; import org.jogre.common.util.JogreUtils; import org.jogre.texasHoldEm.common.TexasHoldEmCoreModel; /** * Server Model for the TexasHoldEm game * * @author Richard Walter * @version Alpha 0.2.3 */ public class TexasHoldEmServerModel extends TexasHoldEmCoreModel { /** * Constructor for the model */ public TexasHoldEmServerModel(int numPlayers) { super(numPlayers); } } |