#include <conio.h>
#include <graphics.h>
#include <stdio.h>
void
p7()
{
getch();
cleardevice();
settextstyle(8, 0, 4);
outtextxy(500, 50,
"7th Phase"
);
setfillstyle(SOLID_FILL, BLUE);
rectangle(850, 500, 950, 550);
floodfill(855, 545, 15);
setfillstyle(SOLID_FILL, GREEN);
rectangle(875, 450, 925, 500);
floodfill(880, 495, 15);
setfillstyle(SOLID_FILL, RED);
rectangle(825, 600, 975, 550);
floodfill(830, 555, 15);
outline();
}
void
p6()
{
getch();
cleardevice();
settextstyle(8, 0, 4);
outtextxy(500, 50,
"6th Phase"
);
setfillstyle(SOLID_FILL, BLUE);
rectangle(850, 500, 950, 550);
floodfill(855, 545, 15);
setfillstyle(SOLID_FILL, GREEN);
rectangle(275, 600, 325, 550);
floodfill(280, 595, 15);
setfillstyle(SOLID_FILL, RED);
rectangle(825, 600, 975, 550);
floodfill(830, 555, 15);
outline();
}
void
p5()
{
getch();
cleardevice();
settextstyle(8, 0, 4);
outtextxy(500, 50,
"5th Phase"
);
setfillstyle(SOLID_FILL, BLUE);
rectangle(550, 550, 650, 600);
floodfill(555, 595, 15);
setfillstyle(SOLID_FILL, GREEN);
rectangle(275, 600, 325, 550);
floodfill(280, 595, 15);
setfillstyle(SOLID_FILL, RED);
rectangle(825, 600, 975, 550);
floodfill(830, 555, 15);
outline();
}
void
p4()
{
getch();
cleardevice();
settextstyle(8, 0, 4);
outtextxy(500, 50,
"4th Phase"
);
setfillstyle(SOLID_FILL, BLUE);
rectangle(550, 550, 650, 600);
floodfill(555, 595, 15);
setfillstyle(SOLID_FILL, GREEN);
rectangle(575, 500, 625, 550);
floodfill(580, 545, 15);
setfillstyle(SOLID_FILL, RED);
rectangle(825, 600, 975, 550);
floodfill(830, 555, 15);
outline();
}
void
p3()
{
getch();
cleardevice();
settextstyle(8, 0, 4);
outtextxy(500, 50,
"3rd Phase"
);
setfillstyle(SOLID_FILL, BLUE);
rectangle(550, 550, 650, 600);
floodfill(555, 595, 15);
setfillstyle(SOLID_FILL, GREEN);
rectangle(575, 500, 625, 550);
floodfill(580, 545, 15);
setfillstyle(SOLID_FILL, RED);
rectangle(225, 550, 375, 600);
floodfill(230, 590, 15);
outline();
}
void
p2()
{
getch();
cleardevice();
settextstyle(8, 0, 4);
outtextxy(500, 50,
"2nd Phase"
);
setfillstyle(SOLID_FILL, BLUE);
rectangle(550, 550, 650, 600);
floodfill(555, 595, 15);
setfillstyle(SOLID_FILL, GREEN);
rectangle(875, 600, 925, 550);
floodfill(880, 595, 15);
setfillstyle(SOLID_FILL, RED);
rectangle(225, 550, 375, 600);
floodfill(230, 590, 15);
outline();
}
void
p1()
{
getch();
cleardevice();
settextstyle(8, 0, 4);
outtextxy(500, 50,
"1st Phase"
);
setfillstyle(SOLID_FILL, GREEN);
rectangle(875, 600, 925, 550);
floodfill(880, 595, 15);
setfillstyle(SOLID_FILL, RED);
rectangle(225, 550, 375, 600);
floodfill(230, 590, 15);
setfillstyle(SOLID_FILL, BLUE);
rectangle(250, 500, 350, 550);
floodfill(255, 545, 15);
outline();
}
void
start()
{
cleardevice();
settextstyle(8, 0, 4);
outtextxy(500, 50,
"Beginning State"
);
setfillstyle(SOLID_FILL, RED);
rectangle(225, 550, 375, 600);
floodfill(230, 590, 15);
setfillstyle(SOLID_FILL, BLUE);
rectangle(250, 500, 350, 550);
floodfill(255, 545, 15);
setfillstyle(SOLID_FILL, GREEN);
rectangle(275, 450, 325, 500);
floodfill(285, 495, 15);
outline();
}
void
outline()
{
line(100, 600, 1100, 600);
line(300, 600, 300, 300);
line(600, 600, 600, 300);
line(900, 600, 900, 300);
settextstyle(8, 0, 2);
outtextxy(290, 620,
"(1)"
);
outtextxy(590, 620,
"(2)"
);
outtextxy(890, 620,
"(3)"
);
}
void
main()
{
int
gd = DETECT, gm;
initgraph(&gd, &gm,
"C:\\turboc3\\bgi"
);
start();
p1();
p2();
p3();
p4();
p5();
p6();
p7();
getch();
closegraph();
}