Skip to content

trbKnl/Terminal-game-Snake-II

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Snake II for the terminal

A fun little game to play in the terminal. It is build using the standard libraries and the ncurses library for the user interface. You can compile the program with, for example, the gcc compiler linking with the ncurses library as follows: gcc snake.c -o snake -lncurses.

I wrote this program to learn some C. I used a linked list to store the location of the snake, mainly because I wanted to implement a linked list. The code works as follows:

  1. Initialize playing field
  2. Retrieve input and validate keyboard input
  3. Determine the next location of the snake
  4. Collision detection and back to 2.

About

Snake II made with the ncurses library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages