This C program simulates the game “snake” which is usually available in old mobile phones. A string of characters moves on the screen according to arrow keys pressed by user. If it touches itself or screen boundary, the program terminates. When the snake moves, in arbitrary screen positions some digit (1-9) appears. The objective of the game is to make the snake eat the said digit, so that it is added to the score. When a digit is eaten, the size of the snake increases by the number of characters equal to the value of the digit.
This is the complete source code of the most favorite flash game ‘Web Breaker’. The source code is written completely in C/C++ programming language. The game runs in DOS graphics mode. You can use either Turbo C++ compiler or Dev C++ compiler to compile and run this code.