From: <umg...@us...> - 2007-03-01 17:22:23
|
Revision: 359 http://svn.sourceforge.net/pybridge/?rev=359&view=rev Author: umgangee Date: 2007-03-01 09:22:17 -0800 (Thu, 01 Mar 2007) Log Message: ----------- Relocated symbol enumeration types from pybridge.bridge.* modules to symbols.py. Added Paths: ----------- trunk/pybridge/pybridge/bridge/symbols.py Added: trunk/pybridge/pybridge/bridge/symbols.py =================================================================== --- trunk/pybridge/pybridge/bridge/symbols.py (rev 0) +++ trunk/pybridge/pybridge/bridge/symbols.py 2007-03-01 17:22:17 UTC (rev 359) @@ -0,0 +1,47 @@ +# PyBridge -- online contract bridge made easy. +# Copyright (C) 2004-2007 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. + + +""" +This module contains enumeration types used for the implementation of bridge. + +The particular ordering of the values in each enumeration is assumed throughout +Pybridge, so it is vital that the order is not changed. +""" + +from pybridge.enum import Enum + + +# Bid levels and strains (denominations). + +Level = Enum('One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven') + +Strain = Enum('Club', 'Diamond', 'Heart', 'Spade', 'NoTrump') + + +# Card ranks and suits. + +Rank = Enum('Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', + 'Ten', 'Jack', 'Queen', 'King', 'Ace') + +Suit = Enum('Club', 'Diamond', 'Heart', 'Spade') + + +# Player compass positions. + +Player = Enum('North', 'East', 'South', 'West') # Clockwise order. + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |