一个扑克牌游戏集合的源码,包含了很多基本c-c++语言应用

源代码在线查看: hearts.html.en

软件大小: 709 K
上传用户: yong_715
关键词: c-c 源码 语言
下载地址: 免注册下载 普通下载 VIP

相关代码

																				  Copyright (C) 2003 - 2006 Markus Schwab (g17m0@lycos.com)								  This 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 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.				-->												        "http://www.w3.org/TR/html4/strict.dtd">												  				    Hearts - A game where you better don't get them				    				    								    				    				    				  								  				    Hearts				    				    Hearts is a trick-taking card game, played with a standard deck				      of 52 playing cards. The game is also known by other names,				      including Black Lady, Black Widow, Chase the Lady, Slippery				      Anne, Ricketty Kate and Slippery Bitch.								    The object of Hearts is to avoid scoring points which one				      gets by taking certain cards in tricks. When one person scores a				      pre-specified amount (usually 100) the game is over, and the				      winner is the person with the lowest score.								    Dealing/Exchange				    Every one of the four players start with thirteen cards.								    In most rounds, each player passes three cards to another				      player; to the left (1st round), to the right (2nd rount) and				      across (3rd round). In the 4th round there's no passing, then				      the cycle is repeated.								    Playing				    It starts the player having the two of clubs (with playing				      exactly that card). The other hands can be lead by any card.								    The player continue counter-clockwise, following suit, if able				      or else any other card.								    The player who played the highest card (of the leading colour)				      gets the played pile and starts the next hand.								    There are a few rules during the game:								    				      A turn can not be started with a heart, if they haven't been played				        before.				      In the first turn neither the queen of spades nor a heart can be				        played.				    								    Scoring				    If there are no more cards left the number of (bad) points are				      counted. Each heart counts as one point and the queen of spade				      counts thirteen points. If a player happens to have got all of				      them (and therefore would have 26 points, aka "shooting the				      moon"), the score is reversed, meaning he got 0 points and all				      of the others 26.								    The game ends, if one of the player reaches 100				      href="#Note1">1 points.								    The player with the lowest score has won.								    The status line gives some information about what's going on!								    Note to the layout				    After starting a game you have (from left to right and from top to				      bottom):								    				      The cards of the human player. On top his won cards, below the cards in				        his hand. The won cards can be inspected by clicking on them;				        right-clicking allows to sort them.								      In the next line it's the same with players 1 and 3. In				        between them there's the played pile.								      In the last line there are the cards of player 2				    								    				    1)				      This can be changed in the settings dialog.								    				    				      				        				          				            Markus Schwab (g17m0@lycos.com)				          				        				        Previous(Buraco)				        Cardgames				        Next(Machiavelli)				      				    				  											

相关资源