https://github.com/selfmadesystem/rust-snake
https://github.com/selfmadesystem/rust-snake
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/selfmadesystem/rust-snake
- Owner: SelfMadeSystem
- License: other
- Created: 2023-09-17T23:31:13.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-17T23:49:39.000Z (over 2 years ago)
- Last Synced: 2025-01-15T01:46:10.248Z (over 1 year ago)
- Language: Rust
- Size: 270 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Snake Rust
## Description
This is a simple snake game written in Rust using the [speedy2d](https://crates.io/crates/speedy2d) library.
## Build
To build the game, you need to have Rust installed. Then, you can run the following command:
```bash
cargo build --release
```
The executable will be located in the `target/release` folder.
## Run
If you already built the game, you can run it using the executable in the `target/release` folder.
If not, you can run the game using the following command:
```bash
cargo run --release
```
## Controls
- `W` or `Up Arrow` to move up
- `A` or `Left Arrow` to move left
- `S` or `Down Arrow` to move down
- `D` or `Right Arrow` to move right
## License
This project is licensed under the DBAD license. See the [LICENSE](LICENSE.md) file for more details.
## Credits
- [The Rust Programming Language](https://doc.rust-lang.org/book/)
- [speedy2d](https://crates.io/crates/speedy2d)
- [rand](https://crates.io/crates/rand)
- [SelfMadeSystem](https://github.com/SelfMadeSystem/) (me)
- [icewormy3](https://github.com/icewormy3)'s teacher for telling her class to make
a snake game in Java using LinkedLists, which inspired me try to make the game in
Python using deque in under 1 hour. I then decided to make the game in Rust because
I felt like it. The Python game is available in the [snek.py](snek.py) file.