diff --git a/Cargo.lock b/Cargo.lock index 25a2f89..f6aaef8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,7 @@ dependencies = [ [[package]] name = "snake" -version = "0.1.0" +version = "0.2.0" dependencies = [ "ncurses", "rand", diff --git a/Cargo.toml b/Cargo.toml index 9476164..98b4b7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snake" -version = "0.1.0" +version = "0.2.0" authors = ["Uttarayan Mondal "] edition = "2018" diff --git a/README.md b/README.md index 84e74dd..c604e78 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Snake in rust +## Snake in rust using [ncurses](https://docs.rs/ncurses) The game is playable @@ -8,7 +8,34 @@ run with cargo run ``` -- To fix bugs -- To Implement the highscore system +#### Keybinds -Learning from [ncurses](https://docs.rs/ncurses) +hjkl or arrow keys for movement + +esc or p to pause + +#### Screenshot + +Click the image for asciinema + +[![snake](images/screenshot.png =650x)](https://asciinema.org/a/PtMG7dghPAEZ7tNgx70sKplKq?autoplay=1) + +#### Todo :construction: + +- [ ] Add a way to change the snake speed + - [ ] Make a ui to switch the snake speed + - [x] Interal implementation of the snake speed +- [ ] Implement Highscore System + - [ ] Make the ui + - [ ] Internal Implementation + +#### Bugs :bug: + +- ~~Snake going through the walls~~ +- ~~Food spawning in the walls~~ +- Remove all the logging in the ui +- Pausing delayed if esc is pressed but not if p is pressed. + +#### Maybe in the future + +- [ ] Autoplay the game using a simple pathfinding algorithm (to show on [r/unixporn](https://reddit.com/r/unixporn) of course :clown_face:) diff --git a/images/screenshot.png b/images/screenshot.png new file mode 100644 index 0000000..2515d7d Binary files /dev/null and b/images/screenshot.png differ