Classes in Python script of snake game

Hi everyone,

I am currently working on a snake game using Python 3. Here is the link to the repository:

I would like to add some new features, like adding some extra points food, or a multi-player mode. To do so, I first need to create classes for the food and the snake’s head (and maybe the body too).

I need advice on how to use classes in my script, in order to create multiple snakes and foods. Any comment on the code in general is also welcome!

Thank you all!

I would encourage you to take a look at the python introduction to Classes in the main python tutorials site.

In addition, you don’t have to use classes to achieve your objective. I would suggest keeping things simple before diving into classes (and object oriented programming in general).

Lastly, it would be helpful to understand more details on what you’re struggling with, what you’ve tried so far, and what kind of errors you may be encountering.