Introduction to Programming for Engineers
Welcome to my personal course page. Here I present my homework and projects created during the course.
A Snake game built in C with a Python interface layer, featuring:
The project demonstrates C programming, Python integration, shared libraries, and Makefiles.
sudo apt install build-essential python3-dev libncurses-dev pip3 install pygame setuptools --break-system-packages
build-essential → gcc to compile C code | python3-dev → Python headers for the C extension | libncurses-dev → needed for the algo stage terminal versions | pygame → graphical window | setuptools → needed to run setup.py
cd your_snake_folder python3 setup.py build_ext --inplace
This compiles snake_game.c and snake_bridge.c into a .so file. A file like snake_bridge.cpython-312-x86_64-linux-gnu.so will appear — that is normal.
python3 snake_ui.py
A window will open. That is it!