Skip to content

Console snake game written in C using only the standard library

License

Notifications You must be signed in to change notification settings

Rank1AltAccount/csnake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

CSnake

A console snake game written in C using only the standard library. I challenged myself to write a program being stripped of the ability to use convenient external libraries, fancy algorithms and OOP. The resulting source code is not to be read by the faint of heart.

Project goals

  • The source should be cross-platform
  • The program should be a console-only application
  • The game should have an A.I. to play itself
  • Do not use external, non-standard libraries (ncurses, conio.h, ...)
  • Do not use OS-specific API wrappers (except for standard library ones)
  • Enjoy the countless opportunities to experience the segfaults and memory corruptions wonders of C

What this program is not

  • The most efficient way to code snake in C
  • A showcase of the best programming practices
  • Something pretty to look at (I have other projects for that)

Compiling

Compile using the C99 standard specifying src/main.c as the source.