10.7. Exercises

  1. Another game similar to the In Between game discussed in this chapter is called acey-deucey. This variant of the game is played exactly the same way, but the high card in the deck is an ace and a two becomes the lowest card. What would you do to implement this variation of the game instead of In Between?

  2. If you made the changes suggested in Exercise 1, can you see any improvements that might make the code easier to understand?

  3. The game of euchre uses a subset of a standard deck of cards. Specifically, only the nines, tens, jacks, queens, kings, and aces are used. If you wanted to write a program that plays euchre, what problems does clsCardDeck pose?

  4. Give the problem stated in Exercise 3, how would you resolve the problem?

  5. Modify the program shown in Figure 10-1 to display only those cards that apply to the game of euchre.

Get Beginning C# 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.