#include <conio.h>#include <stdio.h>#include <stdlib.h>#include <dos.h>#include <graphics.h>#include <math.h> void inicializa() { int gd=DETECT, gm ; initgraph(&gd,&gm, "C:\\TC\\BGI"); } void cab (int x1,int y1, int x2,int y2, int x3,int y3, int x4,int y4, int x5,int y5, int x6,int y6, int x7,int y7, int x8,int y8, int x9,int y9, int x10,int y10, int x11,int y11, int x12,int y12, int x13,int y13, int x14,int y14, int x15,int y15, int x16,int y16, int x17,int y17, int x18,int y18, int SOLID_FILL, int color) { int poly [36]; poly[0]=x1; poly[1]=y1; poly[2]=x2; poly[3]=y2; poly[4]=x3; poly[5]=y3; poly[6]=x4; poly[7]=y4; poly[8]=x5; poly[9]=y5; poly[10]=x6; poly[11]=y6; poly[12]=x7; poly[13]=y7; poly[14]=x8; poly[15]=y8; poly[16]=x9; poly[17]=y9; poly[18]=x10; poly[19]=y10; poly[20]=x11; poly[21]=y11; poly[22]=x12; poly[23]=y12; poly[24]=x13; poly[25]=y13; poly[26]=x14; poly[27]=y14; poly[28]=x15; poly[29]=y15; poly[30]=x16; poly[31]=y16; poly[32]=x17; poly[33]=y17; poly[34]=x18; poly[35]=y18; setfillstyle (SOLID_FILL, color); fillpoly (36,poly ); } void rein (int x1,int y1, int x2,int y2, int x3,int y3, int x4,int y4, int SOLID_FILL, int color) { int poly [8]; poly[0]=x1; poly[1]=y1; poly[2]=x2; poly[3]=y2; poly[4]=x3; poly[5]=y3; poly[6]=x4; poly[7]=y4; setfillstyle (SOLID_FILL, color); fillpoly (8,poly ); } void re (int x1, int y1, int x2, int y2, int x3,int y3, int x4,int y4, int x5,int y5, int x6,int y6, int x7,int y7, int SOLID_FILL, int color) { int poly [14]; poly[0]=x1; poly[1]=y1; poly[2]=x2; poly[3]=y2; poly[4]=x3; poly[5]=y3; poly[6]=x4; poly[7]=y4; poly[8]=x5; poly[9]=y5; poly[10]=x6; poly[11]=y6; poly[12]=x7; poly[13]=y7; setfillstyle (SOLID_FILL, color); fillpoly (14,poly ); } void caballo() { cab(20,13,23,8,27,7,28,5,30,7,33,8,35,21,38,24,33,25,35,28,31,35,19,35,18,32,21,27,22,22,14,24,12,22,12,18,1,WHITE); getch(); } void reina (){ rein (82,6,79,17,71,17,68,6,1, WHITE); getch ();}void rey (){ re(125,5,119,8,118,12,120,18,130,18,132,12,131,8,2,WHITE); getch();} void main (){ inicializa(); caballo(); reina(); rey(); getch();}