Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

Commit aabed33

Browse files
authored
Documentacion (#4)
* Revise README for clarity and structure Updated the README to enhance clarity and organization, including a new demo section and improved feature descriptions. * Remove Team section from README Removed 'Team' section from the README. * Update CONTRIBUTING.md with English translation and tips Translated the contributing guidelines from Spanish to English and added development tips. * Enhance pull request template with new sections Updated the pull request template with new sections and formatting for better clarity and organization. * Enhance bug report template for Snake Game Updated the bug report template to include specific sections and improve clarity.
1 parent 2fa910f commit aabed33

4 files changed

Lines changed: 147 additions & 165 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
# Contribuir al proyecto Snake Game 🐍
1+
# Contributing to Snake Game
22

3-
¡Gracias por tu interés en contribuir! Este proyecto fue desarrollado como trabajo práctico universitario, pero cualquier mejora, corrección o idea es bienvenida.
3+
Thank you for your interest in contributing! This project was developed as a university assignment, but any improvements, bug fixes, or new ideas are more than welcome to make this classic game even better.
44

5-
## Cómo contribuir
5+
## How to Contribute
66

7-
1. **Fork** el repositorio
8-
2. Crea tu rama: `git checkout -b feature/nueva-funcionalidad`
9-
3. Realizá tus cambios y confirmalos: `git commit -m "Agrega nueva funcionalidad"`
10-
4. Empujá tu rama: `git push origin feature/nueva-funcionalidad`
11-
5. Abrí un Pull Request
7+
1. **Fork** the repository.
8+
2. Create your branch: `git checkout -b feature/new-functionality`.
9+
3. Make your changes and commit them: `git commit -m "Add new functionality"`.
10+
4. Push your branch: `git push origin feature/new-functionality`.
11+
5. Open a **Pull Request**.
1212

13-
## Ideas para contribuir
13+
## Ideas for Contribution
1414

15-
- Nuevos modos de juego
16-
- Mejoras gráficas o animaciones
17-
- Mejor balance de dificultad
18-
- Refactor de código a patrones más limpios
15+
- **New Game Modes:** Implement specialized levels, time trials, or "ghost" modes.
16+
- **Visual Improvements:** Add animations for the snake's movement, better fruit textures, or custom background themes.
17+
- **Difficulty Balancing:** Refine the speed increments and obstacle placement for a smoother learning curve.
18+
- **Code Refactoring:** Improve the Object-Oriented structure or apply design patterns to make the code cleaner and more maintainable.
19+
- **Enhanced Physics:** Improve collision detection or add "power-ups" that change the snake's behavior.
1920

20-
Gracias por tu colaboración 🎉
21+
## Development Tips
2122

23+
- **OOP Principles:** Since this is an educational project, try to keep your logic encapsulated within the relevant classes (`Snake`, `Fruit`, `Obstacle`).
24+
- **Gamelib:** Familiarize yourself with how the `gamelib` handles the main loop and events before making deep changes to the rendering logic.
25+
- **Clean Code:** Use descriptive variable names and keep the `src/` directory organized.
26+
27+
Thank you for your collaboration! 🎉
Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,41 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
2+
name: 🐛 Bug report
3+
about: Create a report to help us improve Snake Game
4+
title: '[BUG] '
5+
labels: 'bug'
66
assignees: ''
77

88
---
99

10-
## Descripción
10+
## 📝 Description
1111

12-
Explicá brevemente el problema.
12+
Briefly describe the problem. What is going wrong during the gameplay?
1313

14-
## Cómo reproducir
14+
## 👣 How to Reproduce
1515

16-
Pasos para reproducirlo:
17-
1. Iniciar el juego
18-
2. ...
19-
3. Ocurre el error
16+
Steps to reproduce the behavior:
17+
1. Run `python main.py`
18+
2. Start a new game
19+
3. Perform the action: '...' (e.g., eat a fruit near a wall)
20+
4. See error: '...' (e.g., the game crashes or the snake disappears)
2021

21-
## Comportamiento esperado
22+
## 🎯 Expected Behavior
2223

23-
Qué debería pasar.
24+
A clear and concise description of what you expected to happen (e.g., the snake should grow and the game should continue).
2425

25-
## Capturas de pantalla (si aplica)
26+
## 📸 Screenshots (if applicable)
2627

27-
## Entorno
28+
Add screenshots or GIFs to help explain your problem (especially useful for visual glitches or collision errors).
2829

29-
- Sistema operativo:
30-
- Versión de Python:
31-
- Otro dato relevante:
30+
## 💻 Environment
31+
32+
- **OS:** (e.g. Windows 11, macOS, Ubuntu)
33+
- **Python Version:** (e.g. 3.10.x)
34+
- **Gamelib version:** (if known, or just mention if you modified any file in `graphics/`)
35+
- **Other relevant data:** (e.g., screen resolution or if you are using a specific `obstacles.txt` file)
36+
37+
## 🔍 Additional Context
38+
39+
Add any other context about the problem here. If the terminal showed an error message (Traceback), please paste it here:
40+
```text
41+
[Paste your error log here]

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
1-
# Pull Request
1+
# 🚀 Pull Request
22

3-
## Description
3+
## 📝 Description
44

55
Briefly describe your changes:
6+
- What feature, fix, or refactor did you implement for the Snake?
7+
- How does this improve the gameplay or the code structure?
68

7-
- What feature/fix did you implement?
8-
- Any visual/media changes?
9+
### 📸 Media (Optional)
10+
*If you added new graphics, levels, or visual effects, please attach a screenshot or GIF here.*
911

10-
## Checklist
12+
---
1113

12-
- [ ] My code runs locally
13-
- [ ] I followed the project’s code guidelines
14-
- [ ] I updated documentation if needed
14+
## 🏗️ Type of Change
15+
Please check the option that is relevant:
16+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
17+
- [ ] ✨ New feature (non-breaking change which adds gameplay functionality)
18+
- [ ] ♻️ Code refactor (improving OOP structure without changing behavior)
19+
- [ ] 🎨 Visual/Graphics update
20+
- [ ] 📝 Documentation update
1521

16-
Thanks for your contribution! 🎉
22+
---
23+
24+
## ✅ Checklist
25+
26+
- [ ] My code runs locally and the game starts without errors.
27+
- [ ] I have followed the project’s Object-Oriented Programming (OOP) guidelines.
28+
- [ ] I have tested the collision logic (walls, obstacles, and tail).
29+
- [ ] I have updated the `README.md` or comments if I added new controls or features.
30+
31+
---
32+
33+
Thanks for your contribution to **Snake Game**! 🎉

README.md

Lines changed: 73 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,88 @@
1-
# Snake Game 🐍
1+
# 🐍 Snake Game
22

3-
Welcome to **Snake**, a classic arcade game where you guide a growing snake to eat fruits and avoid obstacles. This project is an implementation of the iconic game in Python, developed with object-oriented programming principles.
3+
Welcome to **Snake**, a classic arcade game implementation in Python. Navigate the snake, eat fruits to grow, and avoid obstacles in this project built with Object-Oriented Programming (OOP) principles.
44

5-
## 📜 Table of Contents
6-
7-
- [Features](#features)
8-
- [Installation](#installation)
9-
- [Usage](#usage)
10-
- [Images](#images)
11-
- [File Structure](#file-structure)
12-
- [Technologies](#technologies)
13-
- [Contributing](#contributing)
14-
- [About This Project](#about)
15-
- [License](#license)
16-
- [Security](#security)
17-
- [Code of Conduct](#code-of-conduct)
18-
19-
20-
## 🕹️ Features <a name="features"></a>
5+
# 📸 Demo
6+
<div style="display: flex; gap: 10px;">
7+
<img alt="Snake Gameplay" src="img/snake.png" width="350px">
8+
<img alt="Game Over Screen" src="img/gameover.png" width="350px">
9+
</div>
2110

22-
- Classic Snake gameplay with growing tail
23-
- Multiple levels with increasing difficulty and obstacles
24-
- Random fruit generation
25-
- Game-over conditions for colliding with obstacles, walls, or the snake's own tail
26-
- Graphical interface with intuitive keyboard controls
11+
# 📍 Table of Contents
12+
- [📝 Description](#-description)
13+
- [🧩 Key Features](#-key-features)
14+
- [🧱 Project Structure](#-project-structure)
15+
- [🛠️ Technologies](#️-technologies)
16+
- [🚀 Getting Started](#-getting-started)
17+
- [📋 Prerequisites](#-prerequisites)
18+
- [⚙️ Installation](#️-installation)
19+
- [💡 Usage](#-usage)
20+
- [🤝 Contributing](#-contributing)
21+
- [📄 License](#-license)
22+
23+
# 📝 Description
24+
This project was developed as a university assignment to demonstrate the use of classes, inheritance, and modular logic in Python. It uses a custom library for graphical rendering and event handling.
25+
26+
## 🧩 Key Features
27+
- **Levels & Difficulty:** Multiple levels with increasing speed and strategic obstacles.
28+
- **Classic Mechanics:** Growing tail system and random fruit spawning.
29+
- **Collision Logic:** Advanced detection for walls, obstacles, and self-collision.
30+
- **Pause System:** Ability to pause the game at any moment.
31+
32+
## 🧱 Project Structure
33+
```text
34+
Snake/
35+
├── graphics/ # Rendering libraries (gamelib & custom)
36+
├── img/ # Demo screenshots
37+
├── resources/ # Configuration files (obstacles.txt)
38+
├── src/ # Core game logic (OOP classes)
39+
│ ├── snake.py
40+
│ ├── fruit.py
41+
│ └── game.py
42+
└── main.py # Entry point
43+
```
2744

28-
## 🚀 Installation <a name="installation"></a>
45+
## 🛠️ Technologies
46+
* **Python 3.x**
47+
* **Gamelib**: A lightweight thread-based rendering library for Python interfaces.
2948

30-
To run this project locally, follow these steps:
49+
# 🚀 Getting Started
50+
## 📋 Prerequisites
51+
* Python 3.10 or higher installed on your system.
3152

53+
## ⚙️ Installation
3254
1. Clone the repository:
3355
```bash
34-
git clone https://github.com/SebaB29/Snake.git
35-
```
36-
37-
2. Navigate to the project directory:
38-
```bash
56+
git clone [https://github.com/SebaB29/Snake.git](https://github.com/SebaB29/Snake.git)
3957
cd Snake
4058
```
41-
42-
3. Run the game:
59+
2. (Optional) Create a virtual environment:
4360
```bash
44-
python main.py
61+
python -m venv venv
62+
source venv/bin/activate # On Windows: venv\Scripts\activate
4563
```
4664

47-
## 🎮 Usage <a name="usage"></a>
48-
49-
Use the following controls to play the game:
50-
51-
- **Left Arrow**: Move left
52-
- **Right Arrow**: Move right
53-
- **Up Arrow**: Move up
54-
- **Down Arrow**: Move down
55-
- **P**: Pause
56-
57-
Avoid obstacles and eat fruits to grow longer!
58-
59-
## 📷 Images <a name="images"></a>
60-
61-
<div style="display: flex;">
62-
<img alt="Img Snake" src="img/snake.png" width="400px" height="400px">
63-
<img alt="Img Game Over" src="img/gameover.png" width="400px" height="400px">
64-
</div>
65-
66-
## 📁 File Structure <a name="file-structure"></a>
67-
68-
The project structure is as follows:
69-
65+
# 💡 Usage
66+
To start the game, simply run the main script:
67+
```bash
68+
python main.py
7069
```
71-
Snake/
72-
├── .github/
73-
│ ├── CODE_OF_CONDUCT.md
74-
│ ├── CONTRIBUTING.md
75-
│ ├── SECURITY.md
76-
│ ├── ISSUE_TEMPLATE/
77-
│ │ ├── bug_report.md
78-
│ │ └── feature_request.md
79-
│ └── PULL_REQUEST_TEMPLATE.md
80-
├── graphics/
81-
│ ├── game_render.py
82-
│ └── gamelib.py
83-
├── img/
84-
│ └── [2 demo images of the game]
85-
├── resources/
86-
│ └── obstacles.txt
87-
├── src/
88-
│ ├── constant.py
89-
│ ├── event_controller.py
90-
│ ├── fruit.py
91-
│ ├── game.py
92-
│ ├── obstacle_loader.py
93-
│ ├── obstacle.py
94-
│ ├── program.py
95-
│ └── snake.py
96-
├── .gitignore
97-
├── LICENSE
98-
├── main.py
99-
└── README.md
100-
```
101-
102-
- **graphics/**: Contains libraries for rendering the game (gamelib and custom graphics).
103-
- **img/**: Includes demo images showcasing the game's functionality.
104-
- **resources/**: Contains the obstacles configuration file (`obstacles.txt`).
105-
- **src/**: Includes source code files for game logic (snake, fruit, obstacles, and game flow).
106-
- **main.py**: The entry point of the application.
107-
108-
## 🛠️ Technologies <a name="technologies"></a>
109-
110-
This project is built with:
111-
112-
- Python
113-
- [Gamelib](https://github.com/dessaya/python-gamelib) (A library created by the instructor to facilitate the use of threads and rendering for the interface)
114-
115-
## 🤝 Contributing <a name="contributing"></a>
116-
117-
Contributions are welcome! If you'd like to improve the game, feel free to fork the repository and submit a pull request.
118-
119-
1. Fork the repository
120-
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
121-
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
122-
4. Push to the branch (`git push origin feature/AmazingFeature`)
123-
5. Open a pull request
124-
125-
## 📚 About This Project <a name="about"></a>
126-
127-
This project was developed as a practical assignment for university. It aims to implement the classic Snake game using Python, focusing on game logic and graphical interface through object-oriented programming principles.
128-
129-
## 📄 License <a name="license"></a>
130-
131-
Distributed under the MIT License. See `LICENSE` for more information.
132-
133-
## 🔐 Security <a name="security"></a>
134-
135-
If you discover a vulnerability, please review our [Security Policy](.github/SECURITY.md) for guidance on reporting.
136-
137-
## 📜 Code of Conduct <a name="code-of-conduct"></a>
13870

139-
Please read our [Code of Conduct](.github/CODE_OF_CONDUCT.md) to understand expected behavior.
71+
## 🎮 Controls
72+
| Key | Action |
73+
|-------------|----------------|
74+
| Arrow Up | Move Up |
75+
| Arrow Down | Move Down |
76+
| Arrow Left | Move Left |
77+
| Arrow Right | Move Right |
78+
| P | Pause / Resume |
79+
80+
# 🤝 Contributing
81+
1. Fork the project.
82+
2. Create your Feature Branch (git checkout -b feature/AmazingFeature).
83+
3. Commit your changes (git commit -m 'Add some AmazingFeature').
84+
4. Push to the Branch (git push origin feature/AmazingFeature).
85+
5. Open a Pull Request.
86+
87+
# 📄 License
88+
This project is licensed under the MIT License - see the LICENSE file for details.

0 commit comments

Comments
 (0)