Void intermediate( void ) //Gives the minefield the 'intermediate' grid and mines Void beginner( void ) //Gives the minefield the 'beginner' grid and mines If( diff = 1 ) //If, else if and else statements that each go to the respective difficulty Printf("\t\tPlease enter either 1, 2, 3 or 4\n") Printf("\t\tChoose a difficulty level(1-3) or 4 for a custom game:") Void difficulty( void ) //Function for choosing the difficulty level Int blank_minefield //This contains the minefield full of '|-|' characters Int minefield //This 2-D array contains all of the mines, numbers and blank spaces The user is asked to position a box in the two-dimensional arrangement, if he does not find a mine he will continue the game until he wins, otherwise he will finish the game and the user will lose. Some squares will have a random mine while others will not. The game consists of clearing all the squares of a two-dimensional arrangement that do not hide a mine. The code is a classic game of minesweeper where the user gives the coordinates of the point he wants to discover from the board, the game is made in c, not in C#. The game works perfectly, but I want to add a timer that measures and shows at the end of the game, the time the player's game lasted.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |