C language custom flag game source code
- 2020-06-03 07:34:15
- OfStack
This article shares the specific code of C language custom flag game for your reference, the specific content is as follows
#include <graphics.h>
#include <time.h>
#define CHESIZE 40 // Board size, cannot be adjusted at will
#define RESETX 170
#define RESETY 350 // Reset the origin
typedef enum // The pieces to be used ID
{
si, jun, shi, lv, tuan,
ying, lian, pai, ban, gong,
fei, chao, zha, qi, lei, bian,
xian, sheng, shen
}CHESSID;
typedef enum // Attack types
{
comatt, preatt, noatt
}ATTSTYLE;
typedef enum // The current party and the party to which the piece belongs
{
blue, red, white
}TEAM;
typedef enum // Checked and unchecked
{
alchoose, unchoose
}CHOOSESTATE;
typedef enum // Area state
{
unknow, empty, exist
}STATE;
typedef struct // coordinates
{
int x;
int y;
}COOR;
typedef struct // pieces
{
CHESSID id; // Pieces of ID
int power; // Rank of pieces
TEAM team; // Subordinate to the party
char *image; // The picture of the chess piece, to consider the running problem, this procedure to replace the word
int scoopc; // Engineers are the number of mines dug
}CHESS;
typedef struct // area
{
COOR crdld; // The lower left coordinates of the region
CHESS chess; // Regional chessman
STATE state; // Area state
}AREA;
typedef struct // User selection information
{
int i;
int j;
CHOOSESTATE state; // Selection state
}CHOOSE;
IMAGE image;
AREA area[6][6]; // Define the checkerboard size
CHESS datachess[19]; // Several basic pawn types
CHOOSE choose; // User selection information
MOUSEMSG mmsg; // The mouse information
TEAM user; // Board of chess party
int lockchessboard = 0; // Lock board or not
int i; // The coordinates of the current mouse area
int j;
char *str[]={" work "," class "," row "," even "," The camp "," group "," brigade "," t "," army "," Department of "," chess "," Fried "," change "," ray "," fly "," super "," l "," god "," fairy "};
void init();
void initchessbute(); // Give the basic parameters to the initializer
void initvalue();
void drawboard(); // Drawing board
void randomarr(int *); // Implement a random arrangement of the moves
void judge();
void getpreij(); // Gets the coordinates of the current mouse region
int checkij(); // Check when the mouse is in the area
void open(); // Open the area
int whemove(); // Determine if you can move
void move(); // mobile
int judgeunknow(); // Check the number of unturned pieces
ATTSTYLE wheattack(); // Determine if you can attack
void kill(); // Kills the currently selected chess
void killself(); // suicide
void perishtogether(); // Mutually assured destruction
void getteam(); // Used to assign a value to a piece when changing its type
void userchange(); // Switch sides
void judgebunko(); // Judge the winning or losing
void choosearea(); // The selected area
void cancelchoose(); // deselect
void change(); // transformation
void bluewin(); // Blue victory
void redwin(); // "Red" victory
void gamehelp(); // Rule description
void quit(); // Quit the game
void peace(); // A draw
void surrender(); // surrender
void resetchessboard(); // reset
// The following functions are used to determine the attack type of pieces
ATTSTYLE judgegong(); // Judge engineers
ATTSTYLE judgecom(); // Judge ordinary people
ATTSTYLE judgezha(); // Determine the bomb
void main() // The main function
{
init();
while (true)
{
mmsg = GetMouseMsg();
getpreij();
if (mmsg.uMsg == WM_LBUTTONDOWN) // Click on the left?
{
judge();
}
else if (mmsg.uMsg == WM_RBUTTONDOWN
&& choose.state==alchoose) // right-click
{
cancelchoose();
}
else if (mmsg.uMsg == WM_MBUTTONDOWN
&& choose.state == alchoose
&& area[choose.i][choose.j].chess.id != zha) // Click the button
{
killself();
cancelchoose();
userchange();
judgebunko();
}
}
}
void init()
{
initgraph(640, 480);
setorigin(RESETX, RESETY); // Reset the origin
setaspectratio(1, -1); // the y Let the top of the axis be the positive half axis
drawboard();
initvalue();
}
void drawboard() // Drawing board
{
int i1;
setlinecolor(WHITE);
for (i1=0; i1<7; i1++)
{
line(i1*CHESIZE, 0, i1*CHESIZE, CHESIZE*6);
}
for (i1=0; i1<7; i1++)
{
line(0, i1*CHESIZE, CHESIZE*6, i1*CHESIZE);
}
setlinecolor(WHITE);
setfillcolor(RED);
rectangle(-10, -10, CHESIZE*6+10, CHESIZE*6+10);
floodfill(-1, -1, WHITE);
rectangle(7*CHESIZE, CHESIZE, 9*CHESIZE, 6*CHESIZE);
line(7*CHESIZE, 5*CHESIZE, 9*CHESIZE, 5*CHESIZE);
line(7*CHESIZE, 4*CHESIZE, 9*CHESIZE, 4*CHESIZE);
line(7*CHESIZE, 3*CHESIZE, 9*CHESIZE, 3*CHESIZE);
line(7*CHESIZE, 2*CHESIZE, 9*CHESIZE, 2*CHESIZE);
setaspectratio(1, 1);
settextstyle(35, 18, " blackbody ");
settextcolor(RED);
outtextxy(7*CHESIZE+2, -6*CHESIZE+2, " help ");
settextcolor(BROWN);
outtextxy(7*CHESIZE+2, -5*CHESIZE+2, " surrender ");
settextcolor(GREEN);
outtextxy(7*CHESIZE+2, -4*CHESIZE+2, " A draw ");
settextcolor(YELLOW);
outtextxy(7*CHESIZE+2, -3*CHESIZE+2, " reset ");
settextcolor(CYAN);
outtextxy(7*CHESIZE+2, -2*CHESIZE+2, " exit ");
settextcolor(LIGHTMAGENTA);
settextstyle(50, 20, " blackbody ");
outtextxy(CHESIZE, -CHESIZE*8, " The two countries military flag ");
setaspectratio(1, -1);
}
void initchessbute() // Set the basic parameters of the chess pieces
{
datachess[0].id = gong;
datachess[0].power = 1;
datachess[0].image = str[0];
datachess[0].scoopc = 0;
datachess[1].id = ban;
datachess[1].power = 2;
datachess[1].image = str[1];
datachess[1].scoopc = 0;
datachess[2].id = pai;
datachess[2].power = 3;
datachess[2].image = str[2];
datachess[2].scoopc = 0;
datachess[3].id = lian;
datachess[3].power = 4;
datachess[3].image = str[3];
datachess[3].scoopc = 0;
datachess[4].id = ying;
datachess[4].power = 5;
datachess[4].image = str[4];
datachess[4].scoopc = 0;
datachess[5].id = tuan;
datachess[5].power = 6;
datachess[5].image = str[5];
datachess[5].scoopc = 0;
datachess[6].id = lv;
datachess[6].power = 7;
datachess[6].image = str[6];
datachess[6].scoopc = 0;
datachess[7].id = shi;
datachess[7].power = 8;
datachess[7].image = str[7];
datachess[7].scoopc = 0;
datachess[8].id = jun;
datachess[8].power = 9;
datachess[8].image = str[8];
datachess[8].scoopc = 0;
datachess[9].id = si;
datachess[9].power = 10;
datachess[9].image = str[9];
datachess[9].scoopc = 0;
datachess[10].id = qi;
datachess[10].power = 100;
datachess[10].image = str[10];
datachess[10].scoopc = 0;
datachess[11].id = zha;
datachess[11].power = 99;
datachess[11].image = str[11];
datachess[11].scoopc = 0;
datachess[12].id = bian;
datachess[12].power = 0;
datachess[12].image = str[12];
datachess[12].scoopc = 0;
datachess[13].id = lei;
datachess[13].power = 98;
datachess[13].image = str[13];
datachess[13].scoopc = 0;
datachess[14].id = fei;
datachess[14].power = 9;
datachess[14].image = str[14];
datachess[14].scoopc = 0;
datachess[15].id = chao;
datachess[15].power = 11;
datachess[15].image = str[15];
datachess[15].scoopc = 0;
datachess[16].id = sheng;
datachess[16].power = 10;
datachess[16].image = str[16];
datachess[16].scoopc = 0;
datachess[17].id = shen;
datachess[17].power = 11;
datachess[17].image = str[17];
datachess[17].scoopc = 0;
datachess[18].id = xian;
datachess[18].power = 11;
datachess[18].image = str[18];
datachess[18].scoopc = 0;
}
void initvalue() // The initialization value
{
CHESS chess[36];
int random[36];
int count;
int i1, j1;
initchessbute();
randomarr(random);
for (i1=0; i1<=11; i1++)
{
chess[i1] = datachess[i1];
chess[i1].team = red;
}
chess[i1] = datachess[11];
chess[i1].team = red;
chess[i1+1] = datachess[0];
chess[i1+1].team = red;
for (i1=0; i1<=11; i1++)
{
chess[i1+14] = datachess[i1];
chess[i1+14].team = blue;
}
chess[i1+14] = datachess[11];
chess[i1+14].team = blue;
chess[i1+15] = datachess[0];
chess[i1+15].team = blue;
for (i1=0; i1<4; i1++)
{
chess[i1+28] = datachess[12];
chess[i1+28].team = white;
chess[i1+32] = datachess[13];
chess[i1+32].team = white;
}
setfillcolor(YELLOW);
for (count=0, i1=0; i1<6; i1++)
{
for (j1=0; j1<6; j1++, count++)
{
area[i1][j1].chess = chess[random[count]];
area[i1][j1].crdld.x = i1 * CHESIZE + 1;
area[i1][j1].crdld.y = j1 * CHESIZE + 1;
area[i1][j1].state = unknow;
floodfill(area[i1][j1].crdld.x, area[i1][j1].crdld.y, WHITE);
}
}
user = red;
choose.state = unchoose;
}
void randomarr(int random[]) // get 0~36 A random arrangement of Numbers
{
int i1, j1;
int flag = 0;
srand(time(NULL));
random[0] = rand() % 36 ;
for (i1=1; i1<36; i1++)
{
while (1)
{
random[i1] = rand() % 36 ;
for (j1=0; j1<i1; j1++)
{
if (random[j1] == random[i1])
{
flag = 1;
break;
}
}
if (flag)
{
flag = 0;
}
else
{
break;
}
}
}
}
void judge() // Determine the current operation to be performed
{
ATTSTYLE attstyle; // Attack types
getpreij();
if (checkij())
{
if (area[i][j].state==unknow && choose.state==unchoose) // Open the
{
open();
userchange();
}
else if(area[i][j].state == empty)
{
if (choose.state == alchoose) // mobile
{
if (whemove())
{
move();
cancelchoose();
userchange();
}
}
}
else
{
if (choose.state == unchoose)
{
if (area[i][j].chess.team==user && area[i][j].chess.id!=qi) // The selected
{
choosearea();
}
}
else
{
if (area[i][j].state!=unknow) // attack
{
attstyle = wheattack();
if (attstyle == comatt)
{
kill();
cancelchoose();
userchange();
}
else if (attstyle == preatt)
{
perishtogether();
cancelchoose();
userchange();
}
else
{
;
}
}
}
}
if (!judgeunknow()) // Judge the win with all the pieces turned over
{
judgebunko();
}
}
}
int judgeunknow()
{
int i1, i2;
int num = 0;
for (i1=0; i1<6; i1++)
{
for (i2=0; i2<6; i2++)
{
if (area[i1][i2].state == unknow)
{
num++;
}
}
}
return num;
}
// Select area
void choosearea()
{
choose.i = i;
choose.j = j;
choose.state = alchoose;
setlinecolor(GREEN);
rectangle(choose.i*CHESIZE, choose.j*CHESIZE, choose.i*CHESIZE+CHESIZE, choose.j*CHESIZE+CHESIZE);
}
// deselect
void cancelchoose()
{
setlinecolor(WHITE);
rectangle(choose.i*CHESIZE, choose.j*CHESIZE, choose.i*CHESIZE+CHESIZE, choose.j*CHESIZE+CHESIZE);
choose.state = unchoose;
}
// Current mouse area
void getpreij()
{
i = (mmsg.x-RESETX) / CHESIZE;
j = -(mmsg.y-RESETY) / CHESIZE;
}
// Check to see if the mouse is in the valid area
int checkij()
{
if ((i==7 || i==8) && j==5)
{
gamehelp();
return 0;
}
else if ((i==7 || i==8) && j==4)
{
if (!lockchessboard)
{
surrender();
}
return 0;
}
else if ((i==7 || i==8) && j==3)
{
if (!lockchessboard)
{
peace();
}
return 0;
}
else if ((i==7 || i==8) && j==2)
{
resetchessboard();
lockchessboard = 0;
return 0;
}
else if ((i==7 || i==8) && j==1)
{
quit();
return 0;
}
else
{
if (!lockchessboard)
{
if ((i>=0 && i<=5 && j>=0 && j<=5 && (mmsg.x-RESETX)>0 && -(mmsg.y-RESETY)>0))
{
return 1;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
}
// Open operation
void open()
{
setfillcolor(BLACK);
floodfill(area[i][j].crdld.x, area[i][j].crdld.y, WHITE);
setaspectratio(1, 1);
if (area[i][j].chess.team == blue)
{
settextcolor(BLUE);
}
else if (area[i][j].chess.team == red)
{
settextcolor(RED);
}
else
{
settextcolor(MAGENTA);
}
settextstyle(35, 18, " blackbody ");
outtextxy(area[i][j].crdld.x, -area[i][j].crdld.y-CHESIZE+2, area[i][j].chess.image);
area[i][j].state = exist;
setaspectratio(1, -1);
}
// Determine if you can move
int whemove()
{
if (area[choose.i][choose.j].chess.id==fei || area[choose.i][choose.j].chess.id==sheng
|| area[choose.i][choose.j].chess.id==shen)
{
if (choose.i==i && abs(choose.j-j)<=5 || choose.j==j && abs(choose.i-i)<=5)
{
return 1;
}
else
{
return 0;
}
}
else if (area[choose.i][choose.j].chess.id == xian)
{
return 1;
}
else
{
if (choose.i==i && abs(choose.j-j)==1 || choose.j==j && abs(choose.i-i)==1)
{
return 1;
}
else
{
return 0;
}
}
}
// mobile
void move()
{
setfillcolor(BLACK);
floodfill(area[choose.i][choose.j].crdld.x, area[choose.i][choose.j].crdld.y, GREEN);
setaspectratio(1, 1);
if (area[choose.i][choose.j].chess.id==gong && area[choose.i][choose.j].chess.scoopc>0)
{
if (area[choose.i][choose.j].chess.team == blue)
{
settextcolor(LIGHTBLUE);
}
else
{
settextcolor(LIGHTRED);
}
}
else
{
if (user == blue)
{
settextcolor(BLUE);
}
else
{
settextcolor(RED);
}
}
settextstyle(35, 18, " blackbody ");
outtextxy(area[i][j].crdld.x, -area[i][j].crdld.y-CHESIZE+2, area[choose.i][choose.j].chess.image);
area[choose.i][choose.j].state = empty;
area[i][j].state = exist;
area[i][j].chess = area[choose.i][choose.j].chess;
setaspectratio(1, -1);
}
// Determines whether an attack can be made and returns the type of attack
ATTSTYLE wheattack()
{
if (whemove())
{
if (area[choose.i][choose.j].chess.id == gong)
{
return judgegong();
}
else if (area[choose.i][choose.j].chess.id == zha)
{
return judgezha();
}
else
{
return judgecom();
}
}
else
{
return noatt;
}
}
// Judge engineers
ATTSTYLE judgegong()
{
if (area[i][j].chess.team != white)
{
if (area[choose.i][choose.j].chess.team != area[i][j].chess.team)
{
if (area[i][j].chess.id==gong || area[i][j].chess.id==zha)
{
return preatt;
}
else if (area[i][j].chess.id == qi)
{
if (area[choose.i][choose.j].chess.scoopc == 0)
{
return noatt;
}
else if (area[choose.i][choose.j].chess.scoopc == 1)
{
area[choose.i][choose.j].chess = datachess[14];
getteam();
return comatt;
}
else if (area[choose.i][choose.j].chess.scoopc == 2)
{
area[choose.i][choose.j].chess = datachess[16];
getteam();
return comatt;
}
else if (area[choose.i][choose.j].chess.scoopc == 3)
{
area[choose.i][choose.j].chess = datachess[17];
getteam();
return comatt;
}
else
{
area[choose.i][choose.j].chess = datachess[18];
getteam();
return comatt;
}
}
else
{
return noatt;
}
}
else
{
return noatt;
}
}
else
{
if (area[i][j].chess.id == lei)
{
area[choose.i][choose.j].chess.scoopc++;
return comatt;
}
else
{
change();
return comatt;
}
}
}
// Determine the bomb
ATTSTYLE judgezha()
{
if (area[choose.i][choose.j].chess.team != area[i][j].chess.team)
{
if (area[i][j].chess.id != qi)
{
return preatt;
}
else
{
return noatt;
}
}
else
{
return noatt;
}
}
// Judge ordinary people
ATTSTYLE judgecom()
{
if (area[i][j].chess.team != white)
{
if (area[choose.i][choose.j].chess.team != area[i][j].chess.team)
{
if (area[choose.i][choose.j].chess.power==area[i][j].chess.power || area[i][j].chess.id==zha)
{
return preatt;
}
else if (area[choose.i][choose.j].chess.power > area[i][j].chess.power)
{
return comatt;
}
else
{
return noatt;
}
}
else
{
return noatt;
}
}
else
{
if (area[i][j].chess.id == lei)
{
return noatt;
}
else
{
change();
return comatt;
}
}
}
// transformation
void change()
{
int x;
x = rand() % 50;
if (x == 6)
{
area[choose.i][choose.j].chess = datachess[15];
getteam();
}
else
{
x = rand() % 4;
if (x == 3)
{
x = rand() % 2;
if (x == 0)
{
area[choose.i][choose.j].chess = datachess[7];
}
else
{
area[choose.i][choose.j].chess = datachess[8];
}
getteam();
}
else
{
x = rand() % 6;
area[choose.i][choose.j].chess = datachess[x];
getteam();
}
}
}
// Assign a value to the owner of a piece
void getteam()
{
if (user == blue)
{
area[choose.i][choose.j].chess.team = blue;
}
else
{
area[choose.i][choose.j].chess.team = red;
}
}
// Kill each other
void kill()
{
move();
}
// suicide
void killself()
{
setfillcolor(BLACK);
floodfill(area[choose.i][choose.j].crdld.x, area[choose.i][choose.j].crdld.y, GREEN);
area[choose.i][choose.j].state = empty;
}
// Mutually assured destruction
void perishtogether()
{
setfillcolor(BLACK);
cancelchoose();
floodfill(area[choose.i][choose.j].crdld.x, area[choose.i][choose.j].crdld.y, WHITE);
floodfill(area[i][j].crdld.x, area[i][j].crdld.y, WHITE);
area[choose.i][choose.j].state = empty;
area[i][j].state = empty;
}
// Switch the holding side
void userchange()
{
if (user == blue)
{
user = red;
setfillcolor(RED);
floodfill(-1, -1, WHITE);
}
else
{
user = blue;
setfillcolor(BLUE);
floodfill(-1, -1, WHITE);
}
}
// Judge the winning or losing
void judgebunko()
{
int i1, j1;
int num1 = 0, num2 = 0;
for (i1=0; i1<6; i1++)
{
for (j1=0; j1<6; j1++)
{
if (area[i1][j1].state != empty)
{
if (area[i1][j1].chess.team==red && area[i1][j1].chess.id!=qi)
{
num1++;
}
else if(area[i1][j1].chess.team==blue && area[i1][j1].chess.id!=qi)
{
num2++;
}
}
}
}
if (num1==0 && num2!=0)
{
bluewin();
}
if (num2==0 && num1!=0)
{
redwin();
}
if (num1==0 && num2==0)
{
peace();
}
}
// The blue side
void bluewin()
{
setaspectratio(1, 1);
settextcolor(BLUE);
settextstyle(50, 20, " blackbody ");
outtextxy(CHESIZE, -CHESIZE*8, " Blue victory ");
setaspectratio(1, -1);
setfillcolor(BLUE);
floodfill(-1, -1, WHITE);
lockchessboard = 1; // Lock the board
}
// The red side
void redwin()
{
setaspectratio(1, 1);
settextcolor(RED);
settextstyle(50, 20, " blackbody ");
outtextxy(CHESIZE, -CHESIZE*8, " "Red" victory ");
setaspectratio(1, -1);
setfillcolor(RED);
floodfill(-1, -1, WHITE);
lockchessboard = 1;
}
// A draw
void peace()
{
setaspectratio(1, 1);
settextcolor(GREEN);
settextstyle(50, 20, " blackbody ");
outtextxy(CHESIZE, -CHESIZE*8, " Shaking hands ");
setaspectratio(1, -1);
setfillcolor(GREEN);
floodfill(-1, -1, WHITE);
lockchessboard = 1;
}
// surrender
void surrender()
{
if (user == blue)
{
redwin();
}
else
{
bluewin();
}
}
// reset
void resetchessboard()
{
cleardevice();
init();
}
// Game shows
void gamehelp()
{
getimage(&image, -10, -10, 500, 350);
cleardevice();
setorigin(50, 0);
setaspectratio(1, 1);
settextcolor(RED);
settextstyle(14, 0, " blackbody ");
outtextxy(-50, 0, " note : Click the left mouse button to return to the game interface ");
settextcolor(WHITE);
settextstyle(24, 0, " blackbody ");
outtextxy(230, 5, " Game shows ");
settextstyle(12, 0, " Song typeface ");
outtextxy(0, 35, " The board size :6*6; Total number of pieces :36; Both sides : red , blue ");
outtextxy(0, 60, " Pawn category : Red chess ( "Red" operation ,14 a ) Blue is ( Blue operation ,14 a ) Purple is ( Function is ,8 a )");
outtextxy(0, 85, " Red chess ( Blue is ) type : The commander , The captains , teachers , brigadier , Head of the , Battalion commander , The company commander , Monitor of the class , ensign , engineers *2, The bomb *2.");
outtextxy(0, 100, " Purple is type : mines *4, Turns into a chess *4. note :'*' This is followed by the number of moves , No notes only 1 a ");
outtextxy(0, 125, " Rule description :1. The commander's largest , Corps of minimum , The big ones eat the small ones ,1 We'll all end up together ,");
outtextxy(textwidth(" Rule description :1."), 140, " Bombs can blow up purple and all the enemy's chess except the flag ( The bombs will disappear )." );
outtextxy(textwidth(" Rule description :"), 155, "2. Engineers can mine , After digging can carry the other side change ( The more mines are dug , The more powerful the character becomes ).");
outtextxy(textwidth(" Rule description :"), 170, "3. Characters can be changed , You become an engineer when you eat it ~ In the army 1 Kind of , There are 1 Fixed probability becomes hidden BOSS.");
outtextxy(textwidth(" Rule description :"), 185, "4. Characters can kill themselves ( calculate 1 operations ).");
outtextxy(textwidth(" Rule description :"), 200, "5. The holder is finished 1 After effective operation , The other side will play ( The border color table is currently holding sides ).");
outtextxy(textwidth(" Rule description :"), 215, "6.1 Party pieces ( Except the ensign ) All be destroyed , Even if lost ; And none of them , Is a draw .");
outtextxy(0, 240, " An operation performed by a chess player : operation 1: Open the pieces ( calculate 1 operations ).");
outtextxy(textwidth(" An operation performed by a chess player :"), 255, " operation 2: attack .");
outtextxy(textwidth(" An operation performed by a chess player :"), 270, " operation 3: mobile .");
outtextxy(textwidth(" An operation performed by a chess player :"), 285, " operation 4: engineers ( Has been dredged ray ) The carry flag .");
outtextxy(textwidth(" An operation performed by a chess player :"), 300, " operation 5: Eat turns into a card .");
outtextxy(textwidth(" An operation performed by a chess player :"), 315, " operation 6: suicide .");
outtextxy(0, 340, " Implement game instructions ( The mouse operation ): Implementation of the operation 1: Select the area where you want to open the piece , Click on the .");
outtextxy(textwidth(" Implement game instructions ( The mouse operation ):"), 355, " Implementation of the operation 2~5: Click select the active party ( The bezel will turn green )");
outtextxy(textwidth(" Implement game instructions ( The mouse operation ): Implementation of the operation 2~5:"), 370, " Click on the passive side again .");
outtextxy(textwidth(" Implement game instructions ( The mouse operation ):"), 385, " Implementation of the operation 6: Select your pieces , The middle key of the single mouse .");
settextcolor(RED);
outtextxy(textwidth(" Implement game instructions ( The mouse operation ):"), 400," note : You have to do something else , The current selection must be unselected first ( Right click undo )");
settextcolor(WHITE);
setlinecolor(WHITE);
line(-30, 420, 570, 420);
outtextxy(0, 425, " Character chess level 1 Browse the ( Contour kill and so on small ): work 1 class 2 even 3 The camp 4 group 5 brigade 6 t 7");
outtextxy(textwidth(" Character chess level 1 Browse the ( Contour kill and so on small ):"), 440, " army 8 fly 8 Department of 9 l 9 god 10 fairy 10");
outtextxy(0, 455, " note :' fly ' ' l ' ' god ' ' fairy ' All of them were changed by engineers who dug mines and carried flags ,' fly '' l '' god ' Could fly straight line ,' fairy ' Can flying ");
while (true)
{
mmsg = GetMouseMsg();
if (mmsg.uMsg == WM_LBUTTONDOWN)
{
break;
}
}
cleardevice();
setorigin(RESETX, RESETY);
setaspectratio(1, -1);
putimage(-10, -10, &image);
}
// Quit the game
void quit()
{
closegraph();
}