关于扑克牌及相关的几个类其他就没有什么可说的了,大家看代码就可以了。
file : card.cs
using System;
using System.Diagnostics ;
namespace Bigeagle.Games.Cards
{
#region 枚举
/// <summary>
/// 花色的枚举
/// </summary>
public enum CardColors
{
/// <summary>
/// 草花
/// </summary>
Club = 0 ,
/// <summary>
/// 方块
/// </summary>
Diamond ,
/// <summary>
/// 红心
/// </summary>
Heart ,
/// <summary>
/// 黑桃
/// </summary>
Spade ,
/// <summary>
/// 没有花色,对应joker
/// </summary>
None
}
/// <summary>
/// 牌大小的枚举
/// </summary>
public enum CardNumbers
{
//Zero = 0 ,
Two = 2 ,
Three ,
Four ,
Five ,
Six ,
Seven ,
Eight ,
Nine ,
Ten ,
Jack ,
Queen ,
King ,
Ace ,
ViceJoker ,
Joker
}
#endregion
/// <summary>
/// 扑克牌类
/// <br>author: bigeagle</br>
/// <br>date: 2002/4/19</br>
/// <br>History: 2002/4/19</br>
///
/// </summary>
/// <remarks>继承iComparable接口,用于比较</remarks>
public class Card : System.IComparable
{
#region 成员变量