在本章我会用一些例子来演示继承,这些例子会用到一些类来表示扑克牌,成副的纸牌和扑克牌型。
In this chapter I demonstrate inheritance using classes that represent playing CARDS, decks of CARDS, and poker hands.
桥牌、扑克和惠斯特都是纸牌游戏。
一种纸牌游戏的变形(例如扑克牌),在这种游戏中,王可以代替持有者选择的任何一张牌。
A variation of certain card games, such as poker, in which each deuce may represent any card the holder chooses.
应用推荐