You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.6 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. # Snake Game in C++
  2. ## Abstract
  3. A simple snake game, with terminal GUI implemented using ncurses library.
  4. #### Controls:
  5. - __Up-Arrow__ to go up.
  6. - __Down-Arrow__ to go down.
  7. - __Left-Arrow__ to go left.
  8. - __Right-Arrow__ to go right.
  9. - __q__ to exit game.
  10. ### TODO:
  11. - [x] Increase speed of the snake when it devours a snack.
  12. - [ ] Add a scoreboard.
  13. - [ ] Fix the window-resize factor, since it gets all messy when you minimize/maximize the terminal window.
  14. ---
  15. ## Prerequisities
  16. You need to install the following two packages:
  17. - __libncurses5-dev__ : Developer’s libraries for ncurses,
  18. - __libncursesw5-dev__ : Developer’s libraries for ncursesw,
  19. - __gcc__ : C\C++ compiler,
  20. - __make__ : instalation tool.
  21. Open up a terminal and type the folllowing commands
  22. ```shell
  23. ~$ sudo apt update && sudo apt upgrade
  24. #Now to install compiler and instalation tool
  25. ~$ sudo apt-get install gcc make
  26. #And the actuall library
  27. ~$ sudo apt-get install libncurses5-dev libncursesw5-dev
  28. ```
  29. Now you are ready to use the repo.
  30. ---
  31. ## Downloading, Instalation and Running the Program
  32. Now we will install and run the program, but first let's download the repo:
  33. ```shell
  34. ~$ git clone https://github.com/VissaMoutafis/Snake_Game_in_Cpp
  35. # cd in the directory
  36. ~$ cd Snake_Game_in_Cpp
  37. #run the 'make run' to install and play
  38. ~$ make run
  39. ```
  40. and enjoy playing!
  41. __Note__: You might want to delete the objective files and keep only the src part. In that case:
  42. ```shell
  43. ~$ make clean
  44. ```
  45. and you are set.
  46. ---
  47. ## Contributors
  48. [VissaM](https://github.com/VissaMoutafis)
  49. ---
  50. ## Licence: MIT
  51. Check the file LICENCE.
  52. ### Enjoy!