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.

76 lines
1.5 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
  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. - [] Add a scoreboard.
  12. - [] Fix the window-resize factor, since it gets all messy when you minimize/maximize the terminal window.
  13. ---
  14. ## Prerequisities
  15. You need to install the following two packages:
  16. - __libncurses5-dev__ : Developer’s libraries for ncurses,
  17. - __libncursesw5-dev__ : Developer’s libraries for ncursesw,
  18. - __gcc__ : C\C++ compiler,
  19. - __make__ : instalation tool.
  20. Open up a terminal and type the folllowing commands
  21. ```shell
  22. ~$ sudo apt update && sudo apt upgrade
  23. #Now to install compiler and instalation tool
  24. ~$ sudo apt-get install gcc make
  25. #And the actuall library
  26. ~$ sudo apt-get install libncurses5-dev libncursesw5-dev
  27. ```
  28. Now you are ready to use the repo.
  29. ---
  30. ## Downloading, Instalation and Running the Program
  31. Now we will install and run the program, but first let's download the repo:
  32. ```shell
  33. ~$ git clone https://github.com/VissaMoutafis/Snake_Game_in_Cpp
  34. # cd in the directory
  35. ~$ cd Snake_Game_in_Cpp
  36. #run the 'make run' to install and play
  37. ~$ make run
  38. ```
  39. and enjoy playing!
  40. __Note__: You might want to delete the objective files and keep only the src part. In that case:
  41. ```shell
  42. ~$ make clean
  43. ```
  44. and you are set.
  45. ---
  46. ## Contributors
  47. [VissaM](https://github.com/VissaMoutafis)
  48. ---
  49. ## Licence: MIT
  50. Check the file LICENCE.
  51. ### Enjoy!