Classic Snake Game - Part 2 (Beginner Python Tutorial on Linux)

Опубликовано: 11 Июнь 2026
на канале: M Heidenreich
3,857
49

This is a multi-video beginner tutorial/intro to Python programming on Linux using the classic snake game as a learning tool.

The following concepts are introduced and explained in Part 2:
Lists, Tuples and Dictionary types
Threading
Exception handling in Python
Python Program Debugging
Terminal control using curses library
Keyboard input using curses

0:00 Intro
0:59 The curses Library Coordinate System
1:29 The tuple Data Type
2:08 Snake Data Structure
3:39 Snake Animation Basics Illustration
3:51 Threading Setup
6:29 Run-time Error Handling
7:02 Snake Animation Example
8:51 Keyboard Setup
12:21 Initial Snake Bearing
12:49 Snake Animation Implementation
14:40 Debugging Python programs using Traceback
15:35 Detecting Snake Collision with Screen Edge
17:04 Game Over Screen
19:40 Game Restart Routine
20:19 Wrap-Up

Full code: https://github.com/mheidenreich/Class...
(Note: code posted may contain small updates and/or bug fixes not shown in the video)

Music: ERF By Bensound.com, https://www.bensound.com/