background image

Snake Game 

 
I create few new functions for my game. I think that black and white color isn't nice, and I 
find library "windows.h" and function, which can change color of our text. 
I use this function to create a start screen, with word "Snake", which is create from character 
"s","n","a","k","e". When we see this string, after that we see loading bar, when it going to 
end of our screen. In our screen how do function which fills characters into DOS window and 
be clean( function "system("cls")"). 

 
 

 

 

 

When I write this function, I must check what size has our DOS window. Writing characters 
is done using a "for" loop. When I want to create loading bar, I must use "for" loop and one 
function from library" windows.h" "Sleep(time)". In place "time" we write time in ms, and 
during this time our program stopped. Next I create primitive function Menu, which is general 
view, what player can choice. I am in the process of creating the algorithm host the game, I 
have problems with it, because I do not know how I can do some things, and during the 
continuation of the work I contacted with Mr.. I add to analysis some screenshots, which 
presented my project and progress in my work. 
 

  

I create screen when player want to exit the game, it is primitive version, but I use I think 
interesting thing, I create a array of characters, and create loop which do: when printf 
character, wait 50 ms and printing next character. "Thanks for playing" I put into array of 
characters.  

 

  

 

Function Highscores will use 
the reading from the file. When 
player end game, He will be 
able to decide whether he wants 
to save the result.