You hould also define a Mah Jongg
class which holds the initial set of 136 tiles. We can create additional
subclasses to add as many as a dozen more tiles to include jokers,
flowers and seasons.
Wall will need an
__init__ that enumerates four copies of each of the
following tiles: the twenty-seven combinations of each suit (dot,
bamboo, and character) and each rank (one through nine). It also needs
to enumerate four copies of each honor tile (east, south, west, north,
red, white, green).
In addition to creating the set of tiles, this class will need
methods to shuffle and deal. In this way the wall is nearly identical
with a deck of playing cards. See the section called “Advanced Class Definition Exercises” for more guidance on this class
Build The Wall Class. Second, build the
Wall. Write a short
test that will be sure that it shuffles and deals tiles