Masoud Mashayekh’s Post

Day 20 & 21 – Snake Game (OOP + Turtle) 🐍🎮 Over the past two days, I built a complete Snake Game in Python while diving deeper into Object-Oriented Programming and game development concepts. Here’s what I worked on: 🖥️ Set up the game screen with smooth animations using tracer(0) and manual updates 🧩 Structured the project into multiple classes: • Snake → handles movement • Food → generates random positions • ScoreBoard → tracks and displays score 🎮 Implemented a real-time game loop for continuous gameplay ⌨️ Added keyboard controls for interactive movement 💥 Built collision detection for: • Food → grow snake + increase score • Walls → game over • Tail → game over 🧬 Explored inheritance by creating a Food class that extends Turtle 🔁 Used super() to understand parent-child class relationships 📚 Learned additional Python concepts like: • List slicing • Tuples This project really helped me connect multiple programming concepts into one complete, interactive application. Excited to keep building and improving 🚀 Link: https://lnkd.in/dV3JYRu9 #Python #Programming #Coding #100DaysOfCode #GameDevelopment #OOP #LearningByDoing

  • graphical user interface

To view or add a comment, sign in

Explore content categories