C++ Codes
Algorithms
Algorithm Analysis in C++
Beginners
Code Snippets
Graphics
Data Structures
File Manipulation
Games
Mathematics
Miscellaneous
Visual C++ Library
C++ > Games sample source codes
Puzzle Game in which numbers are spread randomly & player
Puzzle Game in which numbers are spread randomly & player This program is a game in which numbers are spread randomly & player is supposed to arrange them sr=eriouly. Code : #include
#include
#include
#include
#include
// GLOBAL VARIABLES int a[5][5]; int t[16]={0,4,11,12,7,1,15,5,13,6,10,3,2,14,8,9}; int test[16]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; struct pos { int h,v; }p[4][4]; int row=4,col=4; // FUNCTION PROTOTYPES void game(int); //MOVEMENT void rec(); //DRAWING RECTANGLE void pri(); //PRINTING NUMBERS INITIALLY int getkey(); // TO TRACE KEY PRESSED inline void space() { cout<<" "; } inline void print(int r,int c) { cout<
Privacy Policy
|
Link to Us
|
Links