From: <umg...@us...> - 2007-04-08 20:17:04
|
Revision: 408 http://svn.sourceforge.net/pybridge/?rev=408&view=rev Author: umgangee Date: 2007-04-08 13:17:02 -0700 (Sun, 08 Apr 2007) Log Message: ----------- Remove unused IBridgeTable and IServerState interfaces. Modified Paths: -------------- trunk/pybridge/tests/monkey.py Removed Paths: ------------- trunk/pybridge/pybridge/interfaces/bridgetable.py trunk/pybridge/pybridge/interfaces/serverstate.py Deleted: trunk/pybridge/pybridge/interfaces/bridgetable.py =================================================================== --- trunk/pybridge/pybridge/interfaces/bridgetable.py 2007-04-07 20:56:08 UTC (rev 407) +++ trunk/pybridge/pybridge/interfaces/bridgetable.py 2007-04-08 20:17:02 UTC (rev 408) @@ -1,91 +0,0 @@ -# PyBridge -- online contract bridge made easy. -# Copyright (C) 2004-2006 PyBridge Project. -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -from zope.interface import Interface - - -class IBridgeTable(Interface): - """IBridgeTable defines methods specific to bridge tables.""" - - - def gameMakeCall(self, call, position): - """Add call from player (at position) to bidding.""" - - - def gamePlayCard(self, card, position): - """Add card from player (at position) to current trick.""" - - - def requestNextGame(self, ready, player): - """Indicates that player is ready (or not ready) to commence next game.""" - - - - -class IBridgeTableEvents(Interface): - """IBridgeTableEvents defines the events which may be generated by IBridgeTable. - - """ - - - def gameStarted(self, table, dealer, vulnNS, vulnEW): - """Called when a game is started. - - @param table: reference to table. - @param dealer: - @param vulnNS: - @param vulnEW: - """ - - - def gameFinished(self, table): - """Called when a game is finished. - - A game is finished if trick play is complete, or bidding is passed out, - or it has been aborted. - - @param table: reference to table. - """ - - - def gameCallMade(self, table, call, position): - """Called when a player (at position) makes a call. - - @param table: reference to table. - @param call: - @param position: - """ - - - def gameCardPlayed(self, table, card, position): - """Called when a player (at position) plays a card. - - @param table: reference to table. - @param card: - @param position: - """ - - - def gameHandRevealed(self, table, hand, position): - """Called when a player's hand becomes visible. - - @param table: reference to table. - @param hand: - @param position: - """ - Deleted: trunk/pybridge/pybridge/interfaces/serverstate.py =================================================================== --- trunk/pybridge/pybridge/interfaces/serverstate.py 2007-04-07 20:56:08 UTC (rev 407) +++ trunk/pybridge/pybridge/interfaces/serverstate.py 2007-04-08 20:17:02 UTC (rev 408) @@ -1,28 +0,0 @@ - - -from zope.interface import Interface - - -class IServerEvents(Interface): - """IServerEvents defines methods to track the state of a server.""" - - - def connectionLost(self, connector, reason): - """Called when connection to a server is lost.""" - - - def tableOpened(self, table): - """Called when a new table is opened.""" - - - def tableClosed(self, table): - """Called when an existing table is closed.""" - - - def userLoggedIn(self, user): - """Called when a user has connected and logged in.""" - - - def userLoggedOut(self, user): - """Called when a user has logged out.""" - Modified: trunk/pybridge/tests/monkey.py =================================================================== --- trunk/pybridge/tests/monkey.py 2007-04-07 20:56:08 UTC (rev 407) +++ trunk/pybridge/tests/monkey.py 2007-04-08 20:17:02 UTC (rev 408) @@ -41,7 +41,6 @@ from zope.interface import implements from pybridge.interfaces.observer import IListener -from pybridge.interfaces.serverstate import IServerEvents from pybridge.network.client import NetworkClient from pybridge.network.error import GameError @@ -86,9 +85,7 @@ http://folklore.org/StoryView.py?project=Macintosh&story=Monkey_Lives.txt """ - implements(IServerEvents) - def __init__(self, client): self.client = client self.table = None # RemoteTable. @@ -115,7 +112,7 @@ def joinTable(self): print "Looking for a table to join..." - if self.client.tablesAvailable.get('Monkey'): + if self.client.tableRoster.get('Monkey'): d = self.client.joinTable('Monkey') else: d = self.client.joinTable('Monkey', host=True) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |