Building the Classic Snake Game with Python

Building the Classic Snake Game with Python

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 1h 03m | 213 MB

Are you looking for a fun, meaningful way to level up your Python programming skills? In this course, instructor Robin Andrews shows you how to put together what you need to know to build the Python version of a classic Snake game. Robin introduces you to turtle graphics and how you can use and control animation using Python turtle graphics. He explains global variables and shows you how to draw with turtle graphics by using stamps. With these pieces in place, it’s time to work on the game itself! Robin walks you through how to represent the snake, move it around the screen, and control the snake’s direction. He discusses the game loop that is used to control the game and also goes over how to add snake food to the game, implement a scoring system, and reset the game. Robin finishes up with advice on how to use Lambda expressions to avoid repetition in your game and some fun ways to personalize your game.

Table of Contents

Introduction
1 Take your Python skills to the next level
2 What you should know

1. Introduction to Python Turtle Graphics
3 Meet turtle graphics
4 A starter template for turtle graphics programs
5 Animation with Python turtle graphics
6 Global variables
7 Drawing with stamps

2. The Snake Game
8 Snake representation and movement
9 Basic snake movement program
10 Controlling the snake’s direction
11 The game loop
12 Snake food
13 Keeping score
14 Game reset

3. Finishing Touches
15 Avoiding repetition by using Lambda expressions
16 Personalizing your game

Conclusion
17 Integrating material covered

Homepage