Posts

Showing posts from March, 2016

Minsweeper Game

Source code: #include<graphics.h> #include<conio.h> #include<stdlib.h> #include<dos.h> #define ROWMAX 10 #define COLUMNMAX 10 //////////////////////////// union REGS i,o; enum Bool{false,true}; void InitMouse(); void ShowMouse(); void HideMouse(); int GetX(); int GetY(); int GetB(); int ButtonStatus; void OnLButtonDown(int x,int y); void OnMouseMove(int Click,int x,int y); void OnLButtonUp(int x,int y); int ButtonMoveStatus; int PrevX,PrevY; //////////////////////////////////// void ExplodeAllMines(); void  DisplayNearMines(int,int); void WinGame(); void StartGame(); Bool Check(); Bool bGameOverflag; class CBrick { public:     int Left,Top,Right,Bottom;     int Width,Height;     Bool bBombFlag;     int NearMineCount;     Bool bCheckedFlag;     CBrick()     {         Width=Height=30;        ...

Shuffle Game

Source Code: #include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> #include<ctype.h> #include<dos.h> #include<graphics.h> #define true 1 #define false 0 void disp(); void printmenu();void intro(); void levelmenu();void easy(); void initial(int x); void draw(int x, int y, int i); void userwin(int no);int check(int key); int load,i,step,level,num[25],win; void main() { int gdriver = DETECT, gmode, errorcode; initgraph(&gdriver, &gmode, "..\\bgi"); intro(); levelmenu(); clrscr(); cleardevice(); setbkcolor(RED); easy(); } void levelmenu() { level=0; clrscr(); cleardevice(); setbkcolor(BLACK); settextstyle(1,0,2); setcolor(GREEN); outtextxy(240,240,"Press 1 to start"); outtextxy(240,260,"----------------"); outtextxy(240,280,"1. Start"); outtextxy(240,300,"2. Rules"); outtextxy(240,330,"E...

Forgotten Heros

Source Code: #include <iostream.h> #include <dos.h> #include <mem.h> #include <conio.h> #include <ctime> #include <windows.h> #include <string> //#include <msoftcon.h> //#include <iomanip> using namespace std; //------------------------------------------------------------------------------ // Text Output Functions //------------------------------------------------------------------------------ void DrawColorString(string szText, int X, int Y, WORD color) {        HANDLE OutputH;                                        // This will be used for our handle to the output (basically, holds permission to change the output settings)     COORD position = {X, Y};                 ...