https://github.com/isaka-james/gemu-la-nyoka
Game of Snake written in Rust
https://github.com/isaka-james/gemu-la-nyoka
game piston-window rand rust snake snake-game
Last synced: about 1 year ago
JSON representation
Game of Snake written in Rust
- Host: GitHub
- URL: https://github.com/isaka-james/gemu-la-nyoka
- Owner: isaka-james
- License: mit
- Created: 2024-08-05T14:40:09.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T10:11:13.000Z (almost 2 years ago)
- Last Synced: 2025-01-26T16:47:26.754Z (over 1 year ago)
- Topics: game, piston-window, rand, rust, snake, snake-game
- Language: Rust
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gemu La Nyoka
**Gemu La Nyoka** is a classic snake game implemented in Rust. The goal is to guide the snake to eat food, grow longer, and avoid colliding with itself or the walls. This project demonstrates basic game development principles using Rust.
## Features
- [x] - Simple and intuitive controls
- [x] Incremental difficulty with growing snake
- [x] Fun and engaging gameplay
- [ ] Score tracking
## Screenshots

## Getting Started
### Prerequisites
- Rust (latest stable version)
- Cargo (Rust package manager)
### Installation
1. Clone the repository:
```sh
git clone https://github.com/isaka-james/gemu-la-nyoka.git
```
2. Navigate to the project directory:
```sh
cd gemu-la-nyoka
```
3. Build the project:
```sh
cargo build
```
4. Run the game:
```sh
cargo run
```
## Controls
- **Arrow Keys**: Move the snake
- **ESC**: Exit the game
## Code Structure
- `src/main.rs`: The main entry point for the game
- `src/game.rs`: Contains the game logic and mechanics
- `src/snake.rs`: Handles the snake's movement and growth
- `src/draw.rs`: Functions for drawing game elements on the screen
## Contributing
Contributions are welcome! Please fork the repository and create a pull request for any improvements or new features.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the MIT License. See `LICENSE` for more information.
## Acknowledgments
- Rust community for excellent resources and support
- [Piston Window](https://github.com/PistonDevelopers/piston_window) for the windowing and graphics library
- [rand](https://github.com/rust-random/rand) for random number generation library
- Project inspired by [tensor](https://www.youtube.com/@TensorProgramming)
## Contact
Isaka James - [GitHub](https://github.com/isaka-james)