11: Four Extra Games

Making Games with Python and Pygame · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    11: Four Extra Games

    Included in this chapter is the source code for four extra games. Unfortunately, only the source code (including comments) is in this chapter without any detailed explanation of the code. By now, you can play these games and figure out how the code works by looking at the source code and comments.

    The games are:

    • Flippy – An "Othello" clone where the player tries to flip the computer AI player’s tiles.
    • Ink Spill – A "Flood It" clone that makes use of the flood fill algorithm.
    • Four in a Row – A "Connect Four" clone against the computer AI player.
    • Gemgem – A "Bejeweled" clone where the player swaps gems to try to get three identical gems in a row.

    If you have any questions about the source code in this book, feel free to email the author at al@inventwithpython.com.

    Buggy versions of these programs are also available if you want to practice fixing bugs:


    This page titled 11: Four Extra Games was last modified on Tue, 01 Dec 2020 03:48:57 GMT and is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Al Sweigart via source content that was edited to the style and standards of the LibreTexts platform.