210 CHAPTER12. OBJECT-ORIENTEDDESIGN
theGame.play() # play it
stats.update(theGame) # get info about completedgame
# Print the results
stats.printReport()
main()
raw_input("\nPress
12.3 CaseStudy:DicePoker.
Backin Chapter10,I suggestedthatobjectsareparticularlyusefulforthedesignofgraphicaluserinterfaces.
I wanttofinishupthischapterbylookingata graphicalapplicationusingsomeofthewidgetsthatwe
developedinpreviouschapters.
12.3.1 ProgramSpecification
Ourgoalis towritea gameprogramthatallowsa usertoplayvideopokerusingdice.Theprogramwill
displaya handconsistingoffive dice.Thebasicsetofrulesis asfollows:
Theplayerstartswith$100.