Summary

With the completion of this chapter, we now have a fully graphical version of a game which was previously playable only over the command line. We have identified the key decisions to make before porting the interface of a command-line application over to a graphical one.

The benefits of making programs follow a reusable, class-based data structure have been made clear during the upgrading of our interface, allowing for a lot of code reuse between the previous chapter and this one.

We have learned about the drawing abilities of Tkinter's Canvas widget—we practiced drawing natively via lines and polygons, as well as inserting an image file at certain coordinates.

More detailed controls of the pack geometry manager have been shown, including the use of pack_propagate(0) to keep a Frame at its defined size and pack_forget to replace widgets with others.

While impressive, our blackjack game is not quite complete yet. We will be adding the ability to bet money and continue playing until we run out (or cash out early with a profit). Most games on sale also feature more flashy features, including animations and sound effects. Next on our agenda is to make our game feel more lifelike by adding these features.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset