当前位置:网站首页>Gradient button function button drawing C language example
Gradient button function button drawing C language example
2022-07-19 12:08:00 【Presbyopia】
Gradient button function button drawing C Examples of languages
In this paper, C Language drawing example :
1、 Gradient button draw See drawcover()
2、 Function button small graphics draw See newgame ()
3、 Game graphics twelve squares draw
4、 Boot interface draw
5、 The game sample shows automatic drawing
The sample picture :

See the source code designed below for various painting methods . The mathematical concept of painting method is the same in all kinds of computer languages , Only the expressions of various languages are somewhat different . I use it in my spare time myspringc Language is written on mobile phones .
MySpringC You can not only write simple C Language program , And it can read the values of various sensors in the mobile phone , Control various multimedia devices , So that ordinary users can use C Language controlled mobile phone , Write unexpected 、 Applications suitable for your own use .
v.2.7 Is the current perfect version . The following game code is written on Android phone with it , Can be made into Android mobile desktop app Applications . This sample can be copied and pasted to the compiler for direct use , Also available VB6 ,C++ , java rewrite .
MySpringC Language application example source code :
//**** window Button File menu Design *********
//**** Button gradient painting
//**** Function button design and drawing
//**** Brain damage 12 block The game program Example *****
Canvas cs;
string sBarDes[10];
int nBarId[10];
string sMenu[50];
int nMenu[50];
float pi=3.1415926535;
float src[4]; //ClearDraw (cls) clear screen
string s,ss,ss1,ss2,ss3,ds;
string s1,s2,s3,s4,s5,s6;
float x0,y0,x1,y1,x2,y2,x3,y3,x4,y4;
float sx,sy,dx,dy;
int px,py;
float px1,py1,px2,py2,px3,py3;
float px4,py4,px5,py5,px6,py6;
float px7,py7,px8,py8,px9,py9;
float px10,py10,px11,py11,px12,py12;
float sx1,sy1,sx2,sy2; //draw
float a,L,L1,d,r; //d degree
int drag[9];
FileInput filebox;
string fname; //filename
int picw,pich;
int nOldFun;
int size[2];
int i,j,n,t,k, kn; //t = times
int context; //canvasProc
int obj;
int id;
int event;
float p[3];
int pn; //block piece number
double mode,dmode; //set game mode
int idemo;
int tim[3]; //get Time
int thh,tmm,tss;
int oldhh,oldmm,oldss;
int newhh,newmm,newss;
int mms; //show using time
string hhts,mmts,ssts;
string ts,ts1,ts2;
main(){
setDisplay(1);
cs.SetBackground(255,255,255);
cs.Active();
sBarDes[0]=" Start the game ";
nBarId[0]=100;
sBarDes[1]=" Block number + 1";
nBarId[1]=101;
sBarDes[2]=" Block number -- 1";
nBarId[2]=102;
sBarDes[3]=" Choice mode ";
nBarId[3]=103;
sBarDes[4]=" Exit procedure ";
nBarId[4]=104;
sBarDes[5]="V.";
nBarId[5]=105;
setToolBarHeight(6);
setButtonTextSize(13);
setToolBarBackgroundColor(255,192,192,192);
setButtonColor(255,0,0,240);
setButtonTextColor(255,255,255,255);
setToolBar(50,myToolBarProc,sBarDes,nBarId,6);
sMenu[0]=" Start the game ";
nMenu[0]=200;
sMenu[1]=" Pattern + 1";
nMenu[1]=201;
sMenu[2]=" Pattern -- 1";
nMenu[2]=202;
sMenu[3]=" Choice mode ";
nMenu[3]=203;
sMenu[4]=" Show sample ";
nMenu[4]=204;
sMenu[5]=" Save image ";
nMenu[5]=205;
sMenu[6]=" Version information ";
nMenu[6]=206;
sMenu[7]=" sign out ";
nMenu[7]=207;
setMenu(200,myMenuProc,sMenu,nMenu,8);
setTitle(" Brain block version 2.71");
cs.SetProc (context, mycanvasProc);
//*****************
mode=1;
k=(int)mode;
s=intToString (k);
s3=" Pattern mode = "+s;
newgame ();
drawcover (); // Boot interface
while (){}
}//main ()
newgame (){
//initlize block12 px py when start game
s6=" ";
pn=13;
s=intToString(pn);
s4=" Block number pn = "+s;
idemo=0; //unlock detect finished
if (mode<21){
px1=0; py1=400;
px2=150; py2=400;
px3=300; py3=400;
px4=450; py4=400;
px5=0; py5=560;
px6=55; py6=615;
px7=260; py7=580;
px8=0; py8=820;
px9=400; py9=580;
px10=160; py10=820;
px11=320; py11=820;
px12=480; py12=820; }
if (mode>20){
px1=300; py1=50;
px2=450; py2=50;
px3=300; py3=200;
px4=450; py4=200;
px5=310; py5=360;
px6=400; py6=420;
px7=260; py7=620;
px8=0; py8=820;
px9=400; py9=620;
px10=160; py10=820;
px11=320; py11=820;
px12=480; py12=820; }
getTime (tim);
oldhh=tim[0];
oldmm=tim[1];
oldss=tim[2];
hhts=intToString (tim[0]);
mmts=intToString (tim[1]);
ssts=intToString (tim[2]);
if (oldhh<10)hhts="0"+hhts;
if (oldmm<10)mmts="0"+mmts;
if (oldss<10)ssts="0"+ssts;
ss2=hhts+" : "+mmts+" : "+ssts;
ts=" Start > "+ss2; //drawboard() show start time
ts1=" ";
ts2=" ";
drawboard ();
}//newgame ()
mycanvasProc (int context,int obj,int id,int event,float x,float y){
if (x>600){ //select button pn number *******
if (y>10&&y<60)pn=1;
if (y>60&&y<120)pn=2;
if (y>120&&y<180)pn=3;
if (y>180&&y<240)pn=4;
if (y>240&&y<300)pn=5;
if (y>300&&y<360)pn=6;
if (y>360&&y<420)pn=7;
if (y>420&&y<480)pn=8;
if (y>480&&y<540)pn=9;
if (y>540&&y<600)pn=10;
if (y>600&&y<660)pn=11;
if (y>660&&y<720)pn=12;
if (y>720&&y<780)pn=13;
}
if (x>px1&&x<px1+60&&y>py1&&y<py1+60)pn=1;
if (x>px2&&x<px2+60&&y>py2&&y<py2+60)pn=2;
if (x>px3&&x<px3+60&&y>py3&&y<py3+60)pn=3;
if (x>px4&&x<px4+60&&y>py4&&y<py4+60)pn=4;
if (x>px5&&x<px5+60&&y>py5&&y<py5+60)pn=5;
if (x>px6&&x<px6+60&&y>py6&&y<py6+60)pn=6;
if (x>px7&&x<px7+60&&y>py7&&y<py7+60)pn=7;
if (x>px8&&x<px8+60&&y>py8&&y<py8+60)pn=8;
if (x>px9&&x<px9+60&&y>py9&&y<py9+60)pn=9;
if (x>px10&&x<px10+60&&y>py10&
&y<py10+60)pn=10;
if (x>px11&&x<px11+60&&y>py11&
&y<py11+60)pn=11;
if (x>px12&&x<px12+60&&y>py12&
&y<py12+60)pn=12;
//** get piece position X Y to move blocks
px=(int)(x/50)*50;
py=(int)(y/50)*50;
cs.SetFillMode (1);
cs.SetColor(255,240,240,240);
cs.DrawRect (4,4,600,50); // clear print x y
s=intToString(pn);
s4=" Block number (pn) : "+s;
s=intToString(px);
s1="X = "+s;
s=intToString(py);
s2="Y = "+s;
if (pn==1) {px1=px; py1=py; } //get XY> move
if (pn==2) {px2=px; py2=py; }
if (pn==3) {px3=px; py3=py; }
if (pn==4) {px4=px; py4=py; }
if (pn==5) {px5=px; py5=py; }
if (pn==6) {px6=px; py6=py; }
if (pn==7) {px7=px; py7=py; }
if (pn==8) {px8=px; py8=py; }
if (pn==9) {px9=px; py9=py; }
if (pn==10) {px10=px; py10=py; }
if (pn==11) {px11=px; py11=py; }
if (pn==12) {px12=px; py12=py; }
drawboard ();
//cs.Update();
}//mycanvasProc ()
drawboard (){
cs.ClearDraw (0,src);
//cs.SetStrokeWidth (2);
cs.SetFillMode (1);
cs.SetColor(255,120,120,120);
cs.DrawRect (0,2,729,1090);
cs.SetTextSize (104);
cs.SetColor (255,250,250,0);
cs.DrawText (" Brain block ",50,900);
cs.SetFillMode (0);
cs.SetColor (255,20,250,20);
cs.DrawText (" Brain block ",50,900);
cs.DrawText (" Brain block ",100,780);
cs.DrawText (" Brain block ",50,660);
if (mode<21){ //grids 6 * 10 **********
cs.SetFillMode (1);
cs.SetStrokeWidth(1);
cs.SetColor (255,100,80,10);
cs.DrawRect (43,43,568,367);
cs.SetColor (255,250,250,250);
cs.DrawRect (38,38,562,361);
cs.SetFillMode (0);
cs.SetColor (255,0,120,0);
for (i=1;i<11;i++){ //draw board grids *******
for (j=1;j<7;j++){
cs.DrawRect (i*50,j*50,i*50+48,j*50+48); } }
cs.DrawRect (45,45,553,353); }
if (mode>20&&mode<31){ //grids 5 * 12 ******
cs.SetFillMode (1);
cs.SetStrokeWidth(1);
cs.SetColor (255,250,250,250);
cs.DrawRect (40,40,310,659);
cs.SetFillMode (0);
cs.SetColor (255,0,120,0);
for (i=1;i<6;i++){ //draw board grids *******
for (j=1;j<13;j++){
cs.DrawRect (i*50,j*50,i*50+48,j*50+48); } }
cs.DrawRect (45,45,303,653); }
if (mode>30&&mode<35){ //grids 4 * 15 ******
cs.SetFillMode (1);
cs.SetStrokeWidth(1);
cs.SetColor (255,250,250,250);
cs.DrawRect (40,40,260,809);
cs.SetFillMode (0);
cs.SetColor (255,0,120,0);
for (i=1;i<5;i++){ //draw board grids *******
for (j=1;j<16;j++){
cs.DrawRect (i*50,j*50,i*50+48,j*50+48); } }
cs.DrawRect (45,45,253,803); }
if (mode==35||mode==36){ //grids 3 * 20 ******
cs.SetFillMode (1);
cs.SetStrokeWidth(1);
cs.SetColor (255,250,250,250);
cs.DrawRect (33,0,216,1015);
cs.SetFillMode (0);
cs.SetColor (255,0,120,0);
for (i=1;i<4;i++){ //draw board grids *******
for (j=0;j<20;j++){
cs.DrawRect (i*50,j*50,i*50+48,j*50+48); } }
cs.DrawRect (42,0,206,1005); }
//draw Block B1-12 *************
cs.SetFillMode (1);
cs.SetColor (255,250,0,0); //B1********
if (mode==1||mode==8||mode==13||mode==18||mode==19||mode==21||mode==23||mode==25||mode==28||mode==35||mode==36){
cs.DrawRect (px1,py1,px1+149,py1+49);
cs.DrawRect (px1,py1,px1+49,py1+149); }
if (mode==2||mode==4||mode==5||mode==12||mode==14||mode==27||mode==31||mode==33){
cs.DrawRect (px1,py1,px1+149,py1+49);
cs.DrawRect (px1+100,py1,px1+149,py1+149); }
if (mode==3||mode==6||mode==10||mode==15||mode==16||mode==22||mode==29){
cs.DrawRect (px1,py1,px1+49,py1+149);
cs.DrawRect (px1,py1+100,px1+149,py1+149); }
if (mode==7||mode==9||mode==11||mode==17||mode==20||mode==24||mode==26||mode==30||mode==32||mode==34){
cs.DrawRect (px1+100,py1,px1+149,py1+149);
cs.DrawRect (px1,py1+100,px1+149,py1+149); }
cs.SetColor (255,0,250,0); //B2********
if (mode==1||mode==26||mode==18||mode==20||mode==22||mode==28||mode==31){
cs.DrawRect (px2,py2,px2+49,py2+149);
cs.DrawRect (px2+49,py2,px2+99,py2+49);
cs.DrawRect (px2,py2+100,px2+99,py2+149); }
if (mode==2||mode==6||mode==7||mode==8||mode==13||mode==14||mode==19||mode==24||mode==25||mode==32||mode==33||mode==35||mode==36){
cs.DrawRect (px2,py2,px2+49,py2+99);
cs.DrawRect (px2+100,py2,px2+149,py2+99);
cs.DrawRect (px2,py2+50,px2+149,py2+99);}
if (mode==3||mode==9||mode==10||mode==12||mode==17||mode==23||mode==29){
cs.DrawRect (px2,py2,px2+149,py2+49);
cs.DrawRect (px2,py2,px2+49,py2+99);
cs.DrawRect (px2+100,py2,px2+149,py2+99);}
if (mode==5||mode==4||mode==11||mode==15||mode==16||mode==21||mode==27||mode==30||mode==34){
cs.DrawRect (px2,py2,px2+99,py2+49);
cs.DrawRect (px2,py2+100,px2+99,py2+149);
cs.DrawRect (px2+50,py2,px2+99,py2+149);}
cs.SetColor (255,250,250,0); //B3*********
cs.DrawRect (px3+50,py3,px3+99,py3+149);
cs.DrawRect (px3,py3+50,px3+149,py3+99);
cs.SetColor (255,120,180,250); //B4*******
if (mode==1||mode==3||mode==7||mode==8||mode==21||mode==22||mode==26||mode==27||mode==28||mode==29||mode==32||mode==35){
cs.DrawRect (px4,py4,px4+99,py4+49); //1
cs.DrawRect (px4+50,py4,px4+99,py4+99);
cs.DrawRect (px4+50,py4+50,px4+149,py4+99);
cs.DrawRect (px4+100,py4+50,px4+149,py4+149); }
if (mode==2||mode==5||mode==9||mode==13||mode==20||mode==25||mode==30||mode==34||mode==36){
cs.DrawRect (px4,py4,px4+49,py4+99); //3
cs.DrawRect (px4,py4+50,px4+99,py4+99);
cs.DrawRect (px4+50,py4+50,px4+99,py4+149);
cs.DrawRect (px4+50,py4+100,px4+149,py4+149); }
if (mode==4||mode==10||mode==11||mode==14||mode==15||mode==16||mode==19||mode==23){
cs.DrawRect (px4+50,py4,px4+149,py4+49); //2
cs.DrawRect (px4+50,py4,px4+99,py4+99);
cs.DrawRect (px4,py4+50,px4+99,py4+99);
cs.DrawRect (px4,py4+50,px4+49,py4+149); }
if (mode==6||mode==12||mode==17||mode==18||mode==24||mode==31||mode==33){
cs.DrawRect (px4+100,py4,px4+149,py4+99); //4
cs.DrawRect (px4+50,py4+50,px4+149,py4+99);
cs.DrawRect (px4+50,py4+50,px4+99,py4+149);
cs.DrawRect (px4,py4+100,px4+99,py4+149); }
cs.SetColor (255,250,150,20); //B5*********
if (mode==1||mode==4||mode==6||mode==8||mode==9||mode==10 ||mode==11||mode==13||mode==15||mode==18||mode==19||mode==20||mode==26){
cs.DrawRect (px5,py5,px5+249,py5+49); }
if (mode==2||mode==3||mode==5||mode==7||mode==12||mode==14||mode==16||mode==17||mode==27||mode==28||mode==29||mode==30||mode==21||mode==22||mode==23||mode==24||mode==25||mode==31||mode==32||mode==33||mode==34||mode==35||mode==36){
cs.DrawRect (px5,py5,px5+49,py5+249); }
cs.SetColor (255,150,50,250); //B6*********
if (mode==1||mode==5||mode==9||mode==20){
cs.DrawRect (px6,py6,px6+199,py6+49); //1
cs.DrawRect (px6+150,py6,px6+199,py6+99); }
if (mode==2||mode==7||mode==16||mode==26||mode==30||mode==35){
cs.DrawRect (px6,py6,px6+99,py6+49); //2
cs.DrawRect (px6+50,py6,px6+99,py6+199); }
if (mode==3||mode==12||mode==21||mode==27||mode==29||mode==32||mode==33||mode==36){
cs.DrawRect (px6,py6,px6+49,py6+199); //
cs.DrawRect (px6,py6+150,px6+99,py6+199); }
if (mode==6||mode==28){
cs.DrawRect (px6,py6,px6+49,py6+99); //
cs.DrawRect (px6,py6+50,px6+199,py6+99); }
if (mode==8||mode==4||mode==17||mode==34){
cs.DrawRect (px6,py6,px6+199,py6+49); //
cs.DrawRect (px6,py6,px6+49,py6+99); }
if (mode==10||mode==11||mode==15||mode==19){
cs.DrawRect (px6+50,py6,px6+99,py6+199); //
cs.DrawRect (px6,py6+150,px6+99,py6+199); }
if (mode==13||mode==24||mode==25||mode==31||mode==18){
cs.DrawRect (px6,py6,px6+49,py6+199); //
cs.DrawRect (px6,py6,px6+99,py6+49); }
if (mode==14||mode==23){
cs.DrawRect (px6+150,py6,px6+199,py6+99); //
cs.DrawRect (px6,py6+50,px6+199,py6+99); }
if (mode==22){
cs.DrawRect (px6,py6,px6+199,py6+49); //
cs.DrawRect (px6,py6,px6+49,py6+99); }
cs.SetColor (255,160,80,40); //B7**********
if (mode==1||mode==22||mode==17||mode==19){
cs.DrawRect (px7+50,py7,px7+199,py7+49); //1
cs.DrawRect (px7+50,py7,px7+99,py7+99);
cs.DrawRect (px7,py7+50,px7+99,py7+99); }
if (mode==2||mode==6||mode==8||mode==18||mode==21||mode==24||mode==25||mode==27||mode==31||mode==36){
cs.DrawRect (px7+50,py7,px7+99,py7+149); //3
cs.DrawRect (px7,py7+100,px7+99,py7+149);
cs.DrawRect (px7,py7+100,px7+49,py7+199); }
if (mode==3||mode==10||mode==15||mode==16||mode==29){
cs.DrawRect (px7,py7,px7+49,py7+99); //
cs.DrawRect (px7,py7+50,px7+99,py7+99);
cs.DrawRect (px7+50,py7+50,px7+99,py7+199); }
if (mode==5||mode==33){
cs.DrawRect (px7,py7,px7+99,py7+49); //
cs.DrawRect (px7+50,py7,px7+99,py7+99);
cs.DrawRect (px7+50,py7+50,px7+199,py7+99); }
if (mode==4||mode==7||mode==9||mode==23){
cs.DrawRect (px7+100,py7,px7+199,py7+49); //
cs.DrawRect (px7+100,py7,px7+149,py7+99);
cs.DrawRect (px7,py7+50,px7+149,py7+99); }
if (mode==11||mode==26||mode==28||mode==32||mode==34||mode==35){
cs.DrawRect (px7+50,py7,px7+99,py7+99); //
cs.DrawRect (px7,py7+50,px7+99,py7+99);
cs.DrawRect (px7,py7+50,px7+49,py7+199); }
if (mode==12||mode==20||mode==30){
cs.DrawRect (px7,py7,px7+49,py7+149); //
cs.DrawRect (px7,py7+100,px7+99,py7+149);
cs.DrawRect (px7+50,py7+100,px7+99,py7+199); }
if (mode==13||mode==14){
cs.DrawRect (px7,py7,px7+149,py7+49); //
cs.DrawRect (px7+100,py7,px7+149,py7+99);
cs.DrawRect (px7+100,py7+50,px7+199,py7+99); }
cs.SetColor (255,0,0,250); //B8***********
if (mode==1||mode==9||mode==13||mode==14||mode==19||mode==22||mode==28||mode==30||mode==34||mode==36){
cs.DrawRect (px8,py8,px8+49,py8+149); //1
cs.DrawRect (px8,py8+50,px8+149,py8+99); }
if (mode==2||mode==3||mode==4||mode==11||mode==15||mode==20||mode==29||mode==31){
cs.DrawRect (px8,py8,px8+149,py8+49); //2
cs.DrawRect (px8+50,py8,px8+99,py8+149); }
if (mode==5||mode==7||mode==12||mode==16||mode==17||mode==18||mode==24||mode==25||mode==27){
cs.DrawRect (px8+50,py8,px8+99,py8+149); //3
cs.DrawRect (px8,py8+100,px8+149,py8+149); }
if (mode==6||mode==8||mode==10||mode==21||mode==23||mode==26||mode==32||mode==33||mode==35){
cs.DrawRect (px8,py8+50,px8+149,py8+99); //4
cs.DrawRect (px8+100,py8,px8+149,py8+149); }
cs.SetColor (255,0,250,250); //B9***********
if (mode==1||mode==3||mode==6||mode==8||mode==17||mode==29){
cs.DrawRect (px9+100,py9,px9+149,py9+99);
cs.DrawRect (px9,py9+50,px9+199,py9+99); }
if (mode==2||mode==10||mode==15||mode==19||mode==20||mode==21){
cs.DrawRect (px9+50,py9,px9+99,py9+99);
cs.DrawRect (px9,py9+50,px9+199,py9+99); }
if (mode==4||mode==11||mode==23||mode==25||mode==26||mode==33||mode==35){
cs.DrawRect (px9,py9,px9+49,py9+199);
cs.DrawRect (px9,py9+50,px9+99,py9+99); }
if (mode==5||mode==7||mode==9||mode==16){
cs.DrawRect (px9,py9,px9+199,py9+49);
cs.DrawRect (px9+50,py9,px9+99,py9+99); }
if (mode==12||mode==13||mode==18||mode==27||mode==28||mode==30||mode==32||mode==34||mode==36){
cs.DrawRect (px9+50,py9,px9+99,py9+199);
cs.DrawRect (px9,py9+100,px9+99,py9+149); }
if (mode==14||mode==22||mode==31){
cs.DrawRect (px9+50,py9,px9+99,py9+199);
cs.DrawRect (px9,py9+50,px9+99,py9+99); }
if (mode==24){
cs.DrawRect (px9,py9,px9+199,py9+49);
cs.DrawRect (px9+100,py9,px9+149,py9+99); }
cs.SetColor (255,0,190,0); //B10************
if (mode==1||mode==2||mode==14||mode==24||mode==33||mode==34){
cs.DrawRect (px10,py10,px10+49,py10+99);
cs.DrawRect (px10,py10+50,px10+149,py10+99); cs.DrawRect(px10+50,py10+50,px10+99,py10+149);}
if (mode==21||mode==32){
cs.DrawRect (px10+50,py10,px10+99,py10+99);
cs.DrawRect (px10,py10+50,px10+149,py10+99); cs.DrawRect(px10,py10+50,px10+49,py10+149);}
if (mode==3||mode==5||mode==7||mode==10||mode==22||mode==29){
cs.DrawRect (px10+50,py10,px10+99,py10+99);
cs.DrawRect (px10,py10+50,px10+149,py10+99); cs.DrawRect(px10+100,py10+50,px10+149,py10+149);}
if (mode==6||mode==17||mode==18||mode==19||mode==20||mode==36){
cs.DrawRect (px10+50,py10,px10+149,py10+49); cs.DrawRect (px10,py10+50,px10+99,py10+99); cs.DrawRect(px10+50,py10,px10+99,py10+149);}
if (mode==8||mode==12||mode==13||mode==28){
cs.DrawRect (px10+100,py10,px10+149,py10+99); cs.DrawRect (px10,py10+50,px10+149,py10+99); cs.DrawRect(px10+50,py10+50,px10+99,py10+149);}
if (mode==4||mode==9||mode==11||mode==16||mode==23||mode==26||mode==35){
cs.DrawRect (px10+50,py10,px10+99,py10+149); cs.DrawRect (px10+50,py10+50,px10+149,py10+99); cs.DrawRect(px10,py10+100,px10+99,py10+149);}
if (mode==31){
cs.DrawRect (px10,py10+50,px10+99,py10+99); cs.DrawRect (px10+50,py10,px10+99,py10+149); cs.DrawRect(px10+50,py10+100,px10+149,py10+149);}
if (mode==15||mode==25||mode==27||mode==30){
cs.DrawRect (px10,py10,px10+99,py10+49); cs.DrawRect (px10+50,py10,px10+99,py10+149); cs.DrawRect(px10+50,py10+50,px10+149,py10+99);}
cs.SetColor (255,250,0,250); //B11*********
if (mode==1||mode==6||mode==8||mode==9||mode==13||mode==14||mode==20||mode==25||mode==30||mode==35||mode==36){
cs.DrawRect (px11+50,py11,px11+149,py11+49); cs.DrawRect (px11+50,py11,px11+99,py11+149); cs.DrawRect (px11,py11+100,px11+99,py11+149);}
if (mode==2||mode==3||mode==10||mode==11||mode==18||mode==21||mode==22||mode==26||mode==27||mode==29||mode==31||mode==33){
cs.DrawRect (px11,py11,px11+49,py11+99);
cs.DrawRect (px11,py11+50,px11+149,py11+99); cs.DrawRect(px11+100,py11+50,px11+149,py11+149); }
if (mode==4||mode==5||mode==12){
cs.DrawRect (px11,py11,px11+99,py11+49);
cs.DrawRect (px11+50,py11,px11+99,py11+149); cs.DrawRect(px11+50,py11+100,px11+149,py11+149); }
if (mode==7||mode==15||mode==16||mode==17||mode==19||mode==23||mode==24||mode==28||mode==32||mode==34){
cs.DrawRect (px11+100,py11,px11+149,py11+99);
cs.DrawRect (px11,py11+50,px11+149,py11+99); cs.DrawRect(px11,py11+50,px11+49,py11+149); }
cs.SetColor (255,0,120,0); //B12***********
if (mode==1||mode==23||mode==25||mode==30){
cs.DrawRect (px12+50,py12,px12+99,py12+99); cs.DrawRect (px12,py12+50,px12+99,py12+149); }
if (mode==2||mode==8||mode==10||mode==13||mode==14||mode==15||mode==16||mode==17||mode==21||mode==24||mode==27){
cs.DrawRect (px12,py12,px12+149,py12+49); cs.DrawRect (px12+50,py12,px12+149,py12+99); }
if (mode==3||mode==22||mode==28||mode==29){
cs.DrawRect (px12,py12,px12+99,py12+99); cs.DrawRect (px12+50,py12,px12+99,py12+149); }
if (mode==4||mode==18||mode==26){
cs.DrawRect (px12,py12+50,px12+149,py12+99); cs.DrawRect (px12+50,py12,px12+149,py12+99); }
if (mode==5||mode==6||mode==7||mode==9||mode==33||mode==35||mode==36){
cs.DrawRect (px12,py12,px12+99,py12+99); cs.DrawRect (px12,py12,px12+49,py12+149); }
if (mode==11||mode==12||mode==20||mode==32){
cs.DrawRect (px12,py12,px12+99,py12+99); cs.DrawRect (px12,py12,px12+149,py12+49); }
if (mode==19||mode==31||mode==34){
cs.DrawRect (px12,py12,px12+49,py12+149); cs.DrawRect (px12,py12+50,px12+99,py12+149); }
if (mode==37){
cs.DrawRect (px12,py12,px12+99,py12+99); cs.DrawRect (px12,py12+50,px12+149,py12+99); }
draw_button (); //draw buttons & small blocks
cs.SetTextSize (28);
cs.SetColor (255,255,250,0);
cs.DrawText (s1,490,960); //X
cs.DrawText (s2,620,960); //Y
cs.DrawText (s4,370,30); //pn
cs.DrawText (s3,160,30); //mode
cs.DrawLine (5,970,715,970);
cs.SetTextSize (22);
s="@copyright version 2.71 Compiler : Uncle Zhang Chunshu ( [email protected] )";
cs.DrawText (s,10,994);
cs.SetTextSize (35);
//cs.SetStrokeWidth(1);
cs.SetFillMode (1);
cs.SetColor (255,255,0,250);
cs.DrawText (s6,20,420); //finished
// cs.SetStrokeWidth(0);
cs.SetFillMode (0);
cs.SetColor (255,250,250,0);
cs.DrawText (s6,20,420); //finished
cs.SetFillMode (1);
cs.SetColor (255,250,250,0);
cs.SetTextSize (18);
cs.DrawText (ts,10,30);
cs.SetTextSize (28);
cs.DrawText (ts1,325,460);
cs.DrawText (ts2,325,500);
cs.Update ();
detect_finished ();
}//drawboard ()
draw_button (){
//draw button & show small Blocks ***********
cs.SetColor (255,220,220,220);
for (i=1;i<14;i++){ //draw & show small B
cs.DrawRect (630,i*60-50,713,i*60+8);
cs.DrawCircle (630,i*60-21,29); }
cs.SetTextSize (22);
for (i=1;i<14;i++){ //draw button number
if (i<10){n=11; }else{n=4; }
cs.SetColor (255,250,250,250);
cs.DrawCircle (627,i*60-20,19);
s=intToString (i);
cs.SetColor (255,250,0,0);
cs.DrawText (s,610+n,i*60-12); }
cs.SetColor (255,250,0,0); //sB1********
cs.DrawRect (650,16,695,31);
cs.DrawRect (650,16,665,61);
cs.SetColor (255,0,250,0); //sB2********
cs.DrawRect (650,76,680,91);
cs.DrawRect (650,91,665,106);
cs.DrawRect (650,106,680,121);
cs.SetColor (255,250,250,0); //sB3********
cs.DrawRect (650,151,695,166);
cs.DrawRect (665,136,680,181);
cs.SetColor (255,120,180,250); //sB4********
cs.DrawRect (650,196,680,211);
cs.DrawRect (665,211,695,226);
cs.DrawRect (680,226,695,241);
cs.SetColor (255,250,150,20); //B5*******
cs.DrawRect (635,266,705,281);
cs.SetColor (255,120,50,220); //B6*******
cs.DrawRect (650,321,705,336);
cs.DrawRect (690,336,705,351);
cs.SetColor (255,160,80,40); //B7*******
cs.DrawRect (665,383,705,398);
cs.DrawRect (650,398,680,413);
cs.SetColor (255,0,0,250); //sB8********
cs.DrawRect (650,452,695,466);
cs.DrawRect (650,437,665,481);
cs.SetColor (255,0,250,250); //sB9********
cs.DrawRect (675,502,690,517);
cs.DrawRect (650,517,705,532);
cs.SetColor (255,0,190,0); //sB10********
cs.DrawRect (650,556,665,571);
cs.DrawRect (650,571,695,586);
cs.DrawRect (665,586,680,601);
cs.SetColor (255,250,0,250); //sB11********
cs.DrawRect (665,617,695,632);
cs.DrawRect (665,632,680,647);
cs.DrawRect (650,647,680,662);
cs.SetColor (255,0,120,0); //sB12********
cs.DrawRect (680,677,695,692);
cs.DrawRect (665,692,695,722);
cs.SetColor (255,20,20,200); //s 13********
cs.DrawRect (668,741,678,777);
cs.DrawRect (684,741,694,777);
cs.SetColor (255,250,120,0);
cs.DrawRect (670,743,676,775);
cs.DrawRect (686,743,692,775);
}//draw_button ()
showdemo (){ //show solved image
idemo=1; //locked detect finished image
s6=" Show sample > Complete the drawing : "+s3;
if (mode==1){
px1=50; py1=50;
px2=100; py2=100;
px3=150; py3=100;
px4=200; py4=50;
px5=300; py5=50;
px6=350; py6=100;
px7=300; py7=150;
px8=50; py8=200;
px9=100; py9=250;
px10=250; py10=200;
px11=350; py11=200;
px12=450; py12=200;
drawboard (); } //mode 1
if (mode==2){
px1=400 ; py1=50;
px2=400 ; py2=250;
px3=400 ; py3=150;
px4=200 ; py4=100;
px5=50 ; py5=100;
px6=300 ; py6=150;
px7=100 ; py7=100;
px8=50 ; py8=50;
px9=100 ; py9=250;
px10=350 ; py10=50;
px11=200 ; py11=200;
px12=200 ; py12=50;
drawboard (); } //mode 2
if (mode==3){
px1=50 ; py1=200;
px2=50 ; py2=50;
px3=50 ; py3=100;
px4=300 ; py4=50;
px5=500 ; py5=100;
px6=300 ; py6=100;
px7=200 ; py7=150;
px8=400 ; py8=50;
px9=300 ; py9=250;
px10=100 ; py10=200;
px11=350 ; py11=150;
px12=200 ; py12=50;
drawboard (); } //mode 3
if (mode==4){
px1=400 ; py1=100;
px2=200 ; py2=200;
px3=250 ; py3=100;
px4=200 ; py4=50;
px5=300 ; py5=300;
px6=350 ; py6=50;
px7=50 ; py7=250;
px8=100 ; py8=50;
px9=50 ; py9=50;
px10=50 ; py10=150;
px11=400 ; py11=150;
px12=300 ; py12=200;
drawboard (); } //mode 4
if (mode==5){
px1=400 ; py1=50;
px2=450 ; py2=200;
px3=150 ; py3=100;
px4=150 ; py4=200;
px5=50 ; py5=50;
px6=300 ; py6=100;
px7=250 ; py7=250;
px8=50 ; py8=200;
px9=200 ; py9=50;
px10=250 ; py10=150;
px11=350 ; py11=150;
px12=100 ; py12=50;
drawboard (); } //mode 5
if (mode==6){
px1=50 ; py1=200;
px2=400 ; py2=250;
px3=400 ; py3=150;
px4=100 ; py4=150;
px5=250 ; py5=50;
px6=200 ; py6=50;
px7=100 ; py7=50;
px8=400 ; py8=50;
px9=200 ; py9=250;
px10=300 ; py10=150;
px11=200 ; py11=150;
px12=50 ; py12=50;
drawboard (); } //mode 6
if (mode==7){
px1=350 ; py1=200;
px2=150 ; py2=200;
px3=150 ; py3=100;
px4=200 ; py4=50;
px5=50 ; py5=50;
px6=450 ; py6=150;
px7=200 ; py7=250;
px8=50 ; py8=200;
px9=300 ; py9=50;
px10=300 ; py10=150;
px11=400 ; py11=50;
px12=100 ; py12=50;
drawboard (); } //mode 7
if (mode==8){
px1=50 ; py1=50;
px2=50 ; py2=250;
px3=50 ; py3=150;
px4=300 ; py4=100;
px5=250 ; py5=300;
px6=200 ; py6=250;
px7=450 ; py7=50;
px8=400 ; py8=200;
px9=200 ; py9=150;
px10=100 ; py10=50;
px11=200 ; py11=50;
px12=350 ; py12=50;
drawboard (); } //mode 8
if (mode==9){
px1=400 ; py1=200;
px2=400 ; py2=50;
px3=400 ; py3=100;
px4=350 ; py4=150;
px5=100 ; py5=300;
px6=200 ; py6=250;
px7=100 ; py7=150;
px8=50 ; py8=200;
px9=200 ; py9=50;
px10=100 ; py10=50;
px11=250 ; py11=100;
px12=50 ; py12=50;
drawboard (); } //mode 9
if (mode==10){
px1=50 ; py1=200;
px2=50 ; py2=50;
px3=50 ; py3=100;
px4=300 ; py4=150;
px5=200 ; py5=50;
px6=450 ; py6=50;
px7=200 ; py7=150;
px8=350 ; py8=50;
px9=300 ; py9=250;
px10=100 ; py10=200;
px11=400 ; py11=200;
px12=200 ; py12=100;
drawboard (); } //mode 10
if (mode==11){
px1=400 ; py1=200;
px2=450 ; py2=50;
px3=350 ; py3=50;
px4=250 ; py4=50;
px5=50 ; py5=50;
px6=150 ; py6=150;
px7=250 ; py7=150;
px8=100 ; py8=100;
px9=50 ; py9=100;
px10=50 ; py10=200;
px11=350 ; py11=150;
px12=300 ; py12=250;
drawboard (); } //mode 11
if (mode==12){
px1=50 ; py1=50;
px2=200 ; py2=50;
px3=200 ; py3=100;
px4=200 ; py4=200;
px5=500 ; py5=100;
px6=50 ; py6=150;
px7=350 ; py7=50;
px8=300 ; py8=200;
px9=400 ; py9=150;
px10=100 ; py10=200;
px11=50 ; py11=100;
px12=400 ; py12=50;
drawboard (); } //mode 12
if (mode==13){
px1=50 ; py1=50;
px2=50 ; py2=250;
px3=50 ; py3=150;
px4=250 ; py4=50;
px5=300 ; py5=300;
px6=200 ; py6=150;
px7=300 ; py7=200;
px8=250 ; py8=200;
px9=450 ; py9=100;
px10=100 ; py10=50;
px11=400 ; py11=50;
px12=300 ; py12=50;
drawboard (); } //mode 13
if (mode==14){
px1=400 ; py1=50;
px2=400 ; py2=250;
px3=400 ; py3=150;
px4=100 ; py4=200;
px5=50 ; py5=100;
px6=150 ; py6=250;
px7=50 ; py7=50;
px8=100 ; py8=100;
px9=300 ; py9=150;
px10=350 ; py10=50;
px11=200 ; py11=150;
px12=200 ; py12=50;
drawboard (); } //mode 14
if (mode==15){
px1=50 ; py1=200;
px2=250 ; py2=200;
px3=150 ; py3=200;
px4=400 ; py4=50;
px5=50 ; py5=50;
px6=450 ; py6=100;
px7=50 ; py7=100;
px8=300 ; py8=50;
px9=350 ; py9=250;
px10=100 ; py10=100;
px11=350 ; py11=150;
px12=200 ; py12=100;
drawboard (); } //mode 15
if (mode==16){
px1=200 ; py1=200;
px2=400 ; py2=200;
px3=300 ; py3=200;
px4=250 ; py4=150;
px5=50 ; py5=50;
px6=450 ; py6=150;
px7=100 ; py7=100;
px8=50 ; py8=200;
px9=300 ; py9=50;
px10=200 ; py10=50;
px11=400 ; py11=50;
px12=100 ; py12=50;
drawboard (); } //mode 16
if (mode==17){
px1=400 ; py1=50;
px2=400 ; py2=200;
px3=150 ; py3=200;
px4=250 ; py4=200;
px5=50 ; py5=50;
px6=100 ; py6=50;
px7=250 ; py7=50;
px8=50 ; py8=200;
px9=350 ; py9=250;
px10=100 ; py10=100;
px11=350 ; py11=50;
px12=200 ; py12=150;
drawboard (); } //mode 17
if (mode==18){
px1=50 ; py1=50;
px2=50 ; py2=200;
px3=100 ; py3=200;
px4=200 ; py4=200;
px5=300 ; py5=300;
px6=350 ; py6=50;
px7=250 ; py7=50;
px8=350 ; py8=150;
px9=450 ; py9=100;
px10=400 ; py10=50;
px11=100 ; py11=100;
px12=150 ; py12=50;
drawboard (); } //mode 18
if (mode==19){
px1=50 ; py1=50;
px2=200 ; py2=200;
px3=200 ; py3=100;
px4=400 ; py4=50;
px5=100 ; py5=300;
px6=450 ; py6=100;
px7=150 ; py7=50;
px8=50 ; py8=200;
px9=350 ; py9=250;
px10=300 ; py10=50;
px11=350 ; py11=150;
px12=100 ; py12=100;
drawboard (); } //mode 19
if (mode==20){
px1=400 ; py1=200;
px2=50 ; py2=200;
px3=100 ; py3=200;
px4=250 ; py4=150;
px5=50 ; py5=50;
px6=350 ; py6=50;
px7=300 ; py7=50;
px8=350 ; py8=100;
px9=200 ; py9=250;
px10=150 ; py10=100;
px11=400 ; py11=150;
px12=50 ; py12=100;
drawboard (); } //mode 20
if (mode==21){
px1=100 ; py1=50;
px2=200 ; py2=300;
px3=100 ; py3=300;
px4=150 ; py4=150;
px5=50 ; py5=250;
px6=50 ; py6=50;
px7=50 ; py7=400;
px8=150 ; py8=50;
px9=50 ; py9=550;
px10=100 ; py10=200;
px11=150 ; py11=500;
px12=150 ; py12=450;
drawboard (); } //mode 21
if (mode==22){
px1=50 ; py1=500;
px2=100 ; py2=200;
px3=150 ; py3=350;
px4=150 ; py4=250;
px5=50 ; py5=50;
px6=100 ; py6=50;
px7=100 ; py7=100;
px8=50 ; py8=300;
px9=200 ; py9=450;
px10=50 ; py10=400;
px11=100 ; py11=500;
px12=200 ; py12=150;
drawboard (); } //mode 22
if (mode==23){
px1=50 ; py1=50;
px2=100 ; py2=350;
px3=50 ; py3=150;
px4=50 ; py4=500;
px5=250 ; py5=250;
px6=100 ; py6=550;
px7=100 ; py7=50;
px8=150 ; py8=100;
px9=50 ; py9=250;
px10=150 ; py10=450;
px11=50 ; py11=400;
px12=150 ; py12=200;
drawboard (); } //mode 23
if (mode==24){
px1=150 ; py1=400;
px2=100 ; py2=400;
px3=50 ; py3=250;
px4=150 ; py4=50;
px5=50 ; py5=350;
px6=50 ; py6=100;
px7=200 ; py7=150;
px8=50 ; py8=500;
px9=50 ; py9=50;
px10=100 ; py10=150;
px11=150 ; py11=300;
px12=150 ; py12=550;
drawboard (); } //mode 24
if (mode==25){
px1=50 ; py1=50;
px2=150 ; py2=550;
px3=100 ; py3=400;
px4=50 ; py4=250;
px5=250 ; py5=100;
px6=200 ; py6=50;
px7=200 ; py7=400;
px8=100 ; py8=150;
px9=50 ; py9=350;
px10=150 ; py10=300;
px11=50 ; py11=100;
px12=50 ; py12=500;
drawboard (); } //mode 25
if (mode==26){
px1=150 ; py1=400;
px2=50 ; py2=100;
px3=100 ; py3=100;
px4=50 ; py4=350;
px5=50 ; py5=50;
px6=200 ; py6=100;
px7=200 ; py7=300;
px8=100 ; py8=200;
px9=50 ; py9=400;
px10=50 ; py10=500;
px11=50 ; py11=250;
px12=150 ; py12=550;
drawboard (); } //mode 26
if (mode==27){
px1=150 ; py1=50;
px2=200 ; py2=500;
px3=100 ; py3=500;
px4=100 ; py4=150;
px5=50 ; py5=50;
px6=50 ; py6=450;
px7=50 ; py7=200;
px8=100 ; py8=250;
px9=200 ; py9=200;
px10=50 ; py10=400;
px11=100 ; py11=50;
px12=150 ; py12=400;
drawboard (); } //mode 27
if (mode==28){
px1=50 ; py1=50;
px2=100 ; py2=450;
px3=50 ; py3=150;
px4=150 ; py4=500;
px5=250 ; py5=50;
px6=50 ; py6=550;
px7=50 ; py7=350;
px8=50 ; py8=250;
px9=150 ; py9=150;
px10=100 ; py10=50;
px11=150 ; py11=300;
px12=200 ; py12=400;
drawboard (); } //mode 28
if (mode==29){
px1=50 ; py1=500;
px2=50 ; py2=350;
px3=50 ; py3=400;
px4=50 ; py4=50;
px5=250 ; py5=100;
px6=50 ; py6=100;
px7=200 ; py7=450;
px8=150 ; py8=50;
px9=50 ; py9=250;
px10=100 ; py10=500;
px11=100 ; py11=150;
px12=200 ; py12=350;
drawboard (); } //mode 29
if (mode==30){
px1=100 ; py1=500;
px2=200 ; py2=50;
px3=100 ; py3=350;
px4=50 ; py4=400;
px5=50 ; py5=50;
px6=200 ; py6=450;
px7=100 ; py7=100;
px8=50 ; py8=500;
px9=200 ; py9=250;
px10=100 ; py10=50;
px11=150 ; py11=200;
px12=50 ; py12=250;
drawboard (); } //mode 30
if (mode==31){
px1=100 ; py1=50;
px2=50 ; py2=650;
px3=100 ; py3=450;
px4=50 ; py4=350;
px5=200 ; py5=250;
px6=50 ; py6=150;
px7=50 ; py7=250;
px8=100 ; py8=200;
px9=150 ; py9=550;
px10=100 ; py10=650;
px11=50 ; py11=50;
px12=50 ; py12=500;
drawboard (); } //mode 31
if (mode==32){
px1=100 ; py1=650;
px2=100 ; py2=300;
px3=100 ; py3=550;
px4=50 ; py4=200;
px5=200 ; py5=50;
px6=50 ; py6=250;
px7=50 ; py7=500;
px8=50 ; py8=100;
px9=150 ; py9=400;
px10=50 ; py10=650;
px11=50 ; py11=400;
px12=50 ; py12=50;
drawboard (); } //mode 32
if (mode==33){
px1=100 ; py1=50;
px2=50 ; py2=700;
px3=100 ; py3=450;
px4=100 ; py4=250;
px5=200 ; py5=550;
px6=50 ; py6=300;
px7=50 ; py7=150;
px8=100 ; py8=350;
px9=50 ; py9=500;
px10=50 ; py10=200;
px11=50 ; py11=50;
px12=100 ; py12=600;
drawboard (); } //mode 33
if (mode==34){
px1=100 ; py1=650;
px2=150 ; py2=100;
px3=50 ; py3=100;
px4=100 ; py4=450;
px5=50 ; py5=450;
px6=50 ; py6=50;
px7=150 ; py7=250;
px8=100 ; py8=550;
px9=150 ; py9=350;
px10=50 ; py10=200;
px11=50 ; py11=650;
px12=50 ; py12=300;
drawboard (); } //mode 34
if (mode==35){
px1=50 ; py1=0;
px2=50 ; py2=900;
px3=50 ; py3=800;
px4=50 ; py4=400;
px5=150 ; py5=600;
px6=100 ; py6=50;
px7=50 ; py7=100;
px8=50 ; py8=300;
px9=50 ; py9=450;
px10=50 ; py10=200;
px11=50 ; py11=550;
px12=50 ; py12=700;
drawboard (); } //mode 35
if (mode==36){
px1=50 ; py1=0;
px2=50 ; py2=900;
px3=50 ; py3=800;
px4=50 ; py4=200;
px5=150 ; py5=600;
px6=50 ; py6=500;
px7=100 ; py7=450;
px8=50 ; py8=300;
px9=100 ; py9=100;
px10=50 ; py10=400;
px11=50 ; py11=50;
px12=50 ; py12=700;
drawboard (); } //mode 36
sleep (5000);
idemo=0; //unlock detect finished
newgame ();
}//showdemo ()
detect_finished (){ //detect >>> ********
if (idemo==1)return; //lock demo
if (pn==13)return; //show finished once
if (mode==36){
if(px1==50&&py1==0){ }else{return; }
if(px2==50&&py2==900){ }else{return; }
if(px3==50&&py3==800){ }else{return; }
if(px4==50&&py4==200){ }else{return; }
if(px5==150&&py5==600){ }else{return; }
if(px6==50&&py6==500){ }else{return; }
if(px7==100&&py7==450){ }else{return; }
if(px8==50&&py8==300){ }else{return; }
if(px9==100&&py9==100){ }else{return; }
if(px10==50&&py10==400){ }else{return; }
if(px11==50&&py11==50){ }else{return; }
if(px12==50&&py12==700){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 36
if (mode==35){
if(px1==50&&py1==0){ }else{return; }
if(px2==50&&py2==900){ }else{return; }
if(px3==50&&py3==800){ }else{return; }
if(px4==50&&py4==400){ }else{return; }
if(px5==150&&py5==600){ }else{return; }
if(px6==100&&py6==50){ }else{return; }
if(px7==50&&py7==100){ }else{return; }
if(px8==50&&py8==300){ }else{return; }
if(px9==50&&py9==450){ }else{return; }
if(px10==50&&py10==200){ }else{return; }
if(px11==50&&py11==550){ }else{return; }
if(px12==50&&py12==700){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 35
if (mode==34){
if(px1==100&&py1==650){ }else{return; }
if(px2==150&&py2==100){ }else{return; }
if(px3==50&&py3==100){ }else{return; }
if(px4==100&&py4==450){ }else{return; }
if(px5==50&&py5==450){ }else{return; }
if(px6==50&&py6==50){ }else{return; }
if(px7==150&&py7==250){ }else{return; }
if(px8==100&&py8==550){ }else{return; }
if(px9==150&&py9==350){ }else{return; }
if(px10==50&&py10==200){ }else{return; }
if(px11==50&&py11==650){ }else{return; }
if(px12==50&&py12==300){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 34
if (mode==33){
if(px1==100&&py1==50){ }else{return; }
if(px2==50&&py2==700){ }else{return; }
if(px3==100&&py3==450){ }else{return; }
if(px4==100&&py4==250){ }else{return; }
if(px5==200&&py5==550){ }else{return; }
if(px6==50&&py6==300){ }else{return; }
if(px7==50&&py7==150){ }else{return; }
if(px8==100&&py8==350){ }else{return; }
if(px9==50&&py9==500){ }else{return; }
if(px10==50&&py10==200){ }else{return; }
if(px11==50&&py11==50){ }else{return; }
if(px12==100&&py12==600){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 33
if (mode==32){
if(px1==100&&py1==650){ }else{return; }
if(px2==100&&py2==300){ }else{return; }
if(px3==100&&py3==550){ }else{return; }
if(px4==50&&py4==200){ }else{return; }
if(px5==200&&py5==50){ }else{return; }
if(px6==50&&py6==250){ }else{return; }
if(px7==50&&py7==500){ }else{return; }
if(px8==50&&py8==100){ }else{return; }
if(px9==150&&py9==400){ }else{return; }
if(px10==50&&py10==650){ }else{return; }
if(px11==50&&py11==400){ }else{return; }
if(px12==50&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 32
if (mode==31){
if(px1==100&&py1==50){ }else{return; }
if(px2==50&&py2==650){ }else{return; }
if(px3==100&&py3==450){ }else{return; }
if(px4==50&&py4==350){ }else{return; }
if(px5==200&&py5==250){ }else{return; }
if(px6==50&&py6==150){ }else{return; }
if(px7==50&&py7==250){ }else{return; }
if(px8==100&&py8==200){ }else{return; }
if(px9==150&&py9==550){ }else{return; }
if(px10==100&&py10==650){ }else{return; }
if(px11==50&&py11==50){ }else{return; }
if(px12==50&&py12==500){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 31
if (mode==30){
if(px1==100&&py1==500){ }else{return; }
if(px2==200&&py2==50){ }else{return; }
if(px3==100&&py3==350){ }else{return; }
if(px4==50&&py4==400){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==200&&py6==450){ }else{return; }
if(px7==100&&py7==100){ }else{return; }
if(px8==50&&py8==500){ }else{return; }
if(px9==200&&py9==250){ }else{return; }
if(px10==100&&py10==50){ }else{return; }
if(px11==150&&py11==200){ }else{return; }
if(px12==50&&py12==250){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 30
if (mode==29){
if(px1==50&&py1==500){ }else{return; }
if(px2==50&&py2==350){ }else{return; }
if(px3==50&&py3==400){ }else{return; }
if(px4==50&&py4==50){ }else{return; }
if(px5==250&&py5==100){ }else{return; }
if(px6==50&&py6==100){ }else{return; }
if(px7==200&&py7==450){ }else{return; }
if(px8==150&&py8==50){ }else{return; }
if(px9==50&&py9==250){ }else{return; }
if(px10==100&&py10==500){ }else{return; }
if(px11==100&&py11==150){ }else{return; }
if(px12==200&&py12==350){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 29
if (mode==28){
if(px1==50&&py1==50){ }else{return; }
if(px2==100&&py2==450){ }else{return; }
if(px3==50&&py3==150){ }else{return; }
if(px4==150&&py4==500){ }else{return; }
if(px5==250&&py5==50){ }else{return; }
if(px6==50&&py6==550){ }else{return; }
if(px7==50&&py7==350){ }else{return; }
if(px8==50&&py8==250){ }else{return; }
if(px9==150&&py9==150){ }else{return; }
if(px10==100&&py10==50){ }else{return; }
if(px11==150&&py11==300){ }else{return; }
if(px12==200&&py12==400){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 28
if (mode==27){
if(px1==150&&py1==50){ }else{return; }
if(px2==200&&py2==500){ }else{return; }
if(px3==100&&py3==500){ }else{return; }
if(px4==100&&py4==150){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==50&&py6==450){ }else{return; }
if(px7==50&&py7==200){ }else{return; }
if(px8==100&&py8==250){ }else{return; }
if(px9==200&&py9==200){ }else{return; }
if(px10==50&&py10==400){ }else{return; }
if(px11==100&&py11==50){ }else{return; }
if(px12==150&&py12==400){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 27
if (mode==26){
if(px1==150&&py1==400){ }else{return; }
if(px2==50&&py2==100){ }else{return; }
if(px3==100&&py3==100){ }else{return; }
if(px4==50&&py4==350){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==200&&py6==100){ }else{return; }
if(px7==200&&py7==300){ }else{return; }
if(px8==100&&py8==200){ }else{return; }
if(px9==50&&py9==400){ }else{return; }
if(px10==50&&py10==500){ }else{return; }
if(px11==50&&py11==250){ }else{return; }
if(px12==150&&py12==550){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 26
if (mode==25){
if(px1==50&&py1==50){ }else{return; }
if(px2==150&&py2==550){ }else{return; }
if(px3==100&&py3==400){ }else{return; }
if(px4==50&&py4==250){ }else{return; }
if(px5==250&&py5==100){ }else{return; }
if(px6==200&&py6==50){ }else{return; }
if(px7==200&&py7==400){ }else{return; }
if(px8==100&&py8==150){ }else{return; }
if(px9==50&&py9==350){ }else{return; }
if(px10==150&&py10==300){ }else{return; }
if(px11==50&&py11==100){ }else{return; }
if(px12==50&&py12==500){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 25
if (mode==24){
if(px1==150&&py1==400){ }else{return; }
if(px2==100&&py2==400){ }else{return; }
if(px3==50&&py3==250){ }else{return; }
if(px4==150&&py4==50){ }else{return; }
if(px5==50&&py5==350){ }else{return; }
if(px6==50&&py6==100){ }else{return; }
if(px7==200&&py7==150){ }else{return; }
if(px8==50&&py8==500){ }else{return; }
if(px9==50&&py9==50){ }else{return; }
if(px10==100&&py10==150){ }else{return; }
if(px11==150&&py11==300){ }else{return; }
if(px12==150&&py12==550){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 24
if (mode==23){
if(px1==50&&py1==50){ }else{return; }
if(px2==100&&py2==350){ }else{return; }
if(px3==50&&py3==150){ }else{return; }
if(px4==50&&py4==500){ }else{return; }
if(px5==250&&py5==250){ }else{return; }
if(px6==100&&py6==550){ }else{return; }
if(px7==100&&py7==50){ }else{return; }
if(px8==150&&py8==100){ }else{return; }
if(px9==50&&py9==250){ }else{return; }
if(px10==150&&py10==450){ }else{return; }
if(px11==50&&py11==400){ }else{return; }
if(px12==150&&py12==200){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 23
if (mode==22){
if(px1==50&&py1==500){ }else{return; }
if(px2==100&&py2==200){ }else{return; }
if(px3==150&&py3==350){ }else{return; }
if(px4==150&&py4==250){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==100&&py6==50){ }else{return; }
if(px7==100&&py7==100){ }else{return; }
if(px8==50&&py8==300){ }else{return; }
if(px9==200&&py9==450){ }else{return; }
if(px10==50&&py10==400){ }else{return; }
if(px11==100&&py11==500){ }else{return; }
if(px12==200&&py12==150){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 22
if (mode==21){
if(px1==100&&py1==50){ }else{return; }
if(px2==200&&py2==300){ }else{return; }
if(px3==100&&py3==300){ }else{return; }
if(px4==150&&py4==150){ }else{return; }
if(px5==50&&py5==250){ }else{return; }
if(px6==50&&py6==50){ }else{return; }
if(px7==50&&py7==400){ }else{return; }
if(px8==150&&py8==50){ }else{return; }
if(px9==50&&py9==550){ }else{return; }
if(px10==100&&py10==200){ }else{return; }
if(px11==150&&py11==500){ }else{return; }
if(px12==150&&py12==450){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 21
if (mode==20){
if(px1==400&&py1==200){ }else{return; }
if(px2==50&&py2==200){ }else{return; }
if(px3==100&&py3==200){ }else{return; }
if(px4==250&&py4==150){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==350&&py6==50){ }else{return; }
if(px7==300&&py7==50){ }else{return; }
if(px8==350&&py8==100){ }else{return; }
if(px9==200&&py9==250){ }else{return; }
if(px10==150&&py10==100){ }else{return; }
if(px11==400&&py11==150){ }else{return; }
if(px12==50&&py12==100){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 20
if (mode==19){
if(px1==50&&py1==50){ }else{return; }
if(px2==200&&py2==200){ }else{return; }
if(px3==200&&py3==100){ }else{return; }
if(px4==400&&py4==50){ }else{return; }
if(px5==100&&py5==300){ }else{return; }
if(px6==450&&py6==100){ }else{return; }
if(px7==150&&py7==50){ }else{return; }
if(px8==50&&py8==200){ }else{return; }
if(px9==350&&py9==250){ }else{return; }
if(px10==300&&py10==50){ }else{return; }
if(px11==350&&py11==150){ }else{return; }
if(px12==100&&py12==100){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 19
if (mode==18){
if(px1==50&&py1==50){ }else{return; }
if(px2==50&&py2==200){ }else{return; }
if(px3==100&&py3==200){ }else{return; }
if(px4==200&&py4==200){ }else{return; }
if(px5==300&&py5==300){ }else{return; }
if(px6==350&&py6==50){ }else{return; }
if(px7==250&&py7==50){ }else{return; }
if(px8==350&&py8==150){ }else{return; }
if(px9==450&&py9==100){ }else{return; }
if(px10==400&&py10==50){ }else{return; }
if(px11==100&&py11==100){ }else{return; }
if(px12==150&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 18
if (mode==17){
if(px1==400&&py1==50){ }else{return; }
if(px2==400&&py2==200){ }else{return; }
if(px3==150&&py3==200){ }else{return; }
if(px4==250&&py4==200){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==100&&py6==50){ }else{return; }
if(px7==250&&py7==50){ }else{return; }
if(px8==50&&py8==200){ }else{return; }
if(px9==350&&py9==250){ }else{return; }
if(px10==100&&py10==100){ }else{return; }
if(px11==350&&py11==50){ }else{return; }
if(px12==200&&py12==150){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 17
if (mode==16){
if(px1==200&&py1==200){ }else{return; }
if(px2==400&&py2==200){ }else{return; }
if(px3==300&&py3==200){ }else{return; }
if(px4==250&&py4==150){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==450&&py6==150){ }else{return; }
if(px7==100&&py7==100){ }else{return; }
if(px8==50&&py8==200){ }else{return; }
if(px9==300&&py9==50){ }else{return; }
if(px10==200&&py10==50){ }else{return; }
if(px11==400&&py11==50){ }else{return; }
if(px12==100&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 16
if (mode==15){
if(px1==50&&py1==200){ }else{return; }
if(px2==250&&py2==200){ }else{return; }
if(px3==150&&py3==200){ }else{return; }
if(px4==400&&py4==50){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==450&&py6==100){ }else{return; }
if(px7==50&&py7==100){ }else{return; }
if(px8==300&&py8==50){ }else{return; }
if(px9==350&&py9==250){ }else{return; }
if(px10==100&&py10==100){ }else{return; }
if(px11==350&&py11==150){ }else{return; }
if(px12==200&&py12==100){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 15
if (mode==14){
if(px1==400&&py1==50){ }else{return; }
if(px2==400&&py2==250){ }else{return; }
if(px3==400&&py3==150){ }else{return; }
if(px4==100&&py4==200){ }else{return; }
if(px5==50&&py5==100){ }else{return; }
if(px6==150&&py6==250){ }else{return; }
if(px7==50&&py7==50){ }else{return; }
if(px8==100&&py8==100){ }else{return; }
if(px9==300&&py9==150){ }else{return; }
if(px10==350&&py10==50){ }else{return; }
if(px11==200&&py11==150){ }else{return; }
if(px12==200&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 14
if (mode==13){
if(px1==50&&py1==50){ }else{return; }
if(px2==50&&py2==250){ }else{return; }
if(px3==50&&py3==150){ }else{return; }
if(px4==250&&py4==50){ }else{return; }
if(px5==300&&py5==300){ }else{return; }
if(px6==200&&py6==150){ }else{return; }
if(px7==300&&py7==200){ }else{return; }
if(px8==250&&py8==200){ }else{return; }
if(px9==450&&py9==100){ }else{return; }
if(px10==100&&py10==50){ }else{return; }
if(px11==400&&py11==50){ }else{return; }
if(px12==300&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 13
if (mode==12){
if(px1==50&&py1==50){ }else{return; }
if(px2==200&&py2==50){ }else{return; }
if(px3==200&&py3==100){ }else{return; }
if(px4==200&&py4==200){ }else{return; }
if(px5==500&&py5==100){ }else{return; }
if(px6==50&&py6==150){ }else{return; }
if(px7==350&&py7==50){ }else{return; }
if(px8==300&&py8==200){ }else{return; }
if(px9==400&&py9==150){ }else{return; }
if(px10==100&&py10==200){ }else{return; }
if(px11==50&&py11==100){ }else{return; }
if(px12==400&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 12
if (mode==11){
if(px1==400&&py1==200){ }else{return; }
if(px2==450&&py2==50){ }else{return; }
if(px3==350&&py3==50){ }else{return; }
if(px4==250&&py4==50){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==150&&py6==150){ }else{return; }
if(px7==250&&py7==150){ }else{return; }
if(px8==100&&py8==100){ }else{return; }
if(px9==50&&py9==100){ }else{return; }
if(px10==50&&py10==200){ }else{return; }
if(px11==350&&py11==150){ }else{return; }
if(px12==300&&py12==250){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 11
if (mode==10){
if(px1==50&&py1==200){ }else{return; }
if(px2==50&&py2==50){ }else{return; }
if(px3==50&&py3==100){ }else{return; }
if(px4==300&&py4==150){ }else{return; }
if(px5==200&&py5==50){ }else{return; }
if(px6==450&&py6==50){ }else{return; }
if(px7==200&&py7==150){ }else{return; }
if(px8==350&&py8==50){ }else{return; }
if(px9==300&&py9==250){ }else{return; }
if(px10==100&&py10==200){ }else{return; }
if(px11==400&&py11==200){ }else{return; }
if(px12==200&&py12==100){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 10
if (mode==9){
if(px1==400&&py1==200){ }else{return; }
if(px2==400&&py2==50){ }else{return; }
if(px3==400&&py3==100){ }else{return; }
if(px4==350&&py4==150){ }else{return; }
if(px5==100&&py5==300){ }else{return; }
if(px6==200&&py6==250){ }else{return; }
if(px7==100&&py7==150){ }else{return; }
if(px8==50&&py8==200){ }else{return; }
if(px9==200&&py9==50){ }else{return; }
if(px10==100&&py10==50){ }else{return; }
if(px11==250&&py11==100){ }else{return; }
if(px12==50&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 9
if (mode==8){
if(px1==50&&py1==50){ }else{return; }
if(px2==50&&py2==250){ }else{return; }
if(px3==50&&py3==150){ }else{return; }
if(px4==300&&py4==100){ }else{return; }
if(px5==250&&py5==300){ }else{return; }
if(px6==200&&py6==250){ }else{return; }
if(px7==450&&py7==50){ }else{return; }
if(px8==400&&py8==200){ }else{return; }
if(px9==200&&py9==150){ }else{return; }
if(px10==100&&py10==50){ }else{return; }
if(px11==200&&py11==50){ }else{return; }
if(px12==350&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 8
if (mode==7){
if(px1==350&&py1==200){ }else{return; }
if(px2==150&&py2==200){ }else{return; }
if(px3==150&&py3==100){ }else{return; }
if(px4==200&&py4==50){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==450&&py6==150){ }else{return; }
if(px7==200&&py7==250){ }else{return; }
if(px8==50&&py8==200){ }else{return; }
if(px9==300&&py9==50){ }else{return; }
if(px10==300&&py10==150){ }else{return; }
if(px11==400&&py11==50){ }else{return; }
if(px12==100&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 7
if (mode==6){
if(px1==50&&py1==200){ }else{return; }
if(px2==400&&py2==250){ }else{return; }
if(px3==400&&py3==150){ }else{return; }
if(px4==100&&py4==150){ }else{return; }
if(px5==250&&py5==50){ }else{return; }
if(px6==200&&py6==50){ }else{return; }
if(px7==100&&py7==50){ }else{return; }
if(px8==400&&py8==50){ }else{return; }
if(px9==200&&py9==250){ }else{return; }
if(px10==300&&py10==150){ }else{return; }
if(px11==200&&py11==150){ }else{return; }
if(px12==50&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 6
if (mode==5){
if(px1==400&&py1==50){ }else{return; }
if(px2==450&&py2==200){ }else{return; }
if(px3==150&&py3==100){ }else{return; }
if(px4==150&&py4==200){ }else{return; }
if(px5==50&&py5==50){ }else{return; }
if(px6==300&&py6==100){ }else{return; }
if(px7==250&&py7==250){ }else{return; }
if(px8==50&&py8==200){ }else{return; }
if(px9==200&&py9==50){ }else{return; }
if(px10==250&&py10==150){ }else{return; }
if(px11==350&&py11==150){ }else{return; }
if(px12==100&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 5
if (mode==4){
if(px1==400&&py1==100){ }else{return; }
if(px2==200&&py2==200){ }else{return; }
if(px3==250&&py3==100){ }else{return; }
if(px4==200&&py4==50){ }else{return; }
if(px5==300&&py5==300){ }else{return; }
if(px6==350&&py6==50){ }else{return; }
if(px7==50&&py7==250){ }else{return; }
if(px8==100&&py8==50){ }else{return; }
if(px9==50&&py9==50){ }else{return; }
if(px10==50&&py10==150){ }else{return; }
if(px11==400&&py11==150){ }else{return; }
if(px12==300&&py12==200){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 4
if (mode==3){
if(px1==50&&py1==200){ }else{return; }
if(px2==50&&py2==50){ }else{return; }
if(px3==50&&py3==100){ }else{return; }
if(px4==300&&py4==50){ }else{return; }
if(px5==500&&py5==100){ }else{return; }
if(px6==300&&py6==100){ }else{return; }
if(px7==200&&py7==150){ }else{return; }
if(px8==400&&py8==50){ }else{return; }
if(px9==300&&py9==250){ }else{return; }
if(px10==100&&py10==200){ }else{return; }
if(px11==350&&py11==150){ }else{return; }
if(px12==200&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 3
if (mode==1){
if(px1==50&&py1==50){ }else{return; }
if(px2==100&&py2==100){ }else{return; }
if(px3==150&&py3==100){ }else{return; }
if(px4==200&&py4==50){ }else{return; }
if(px5==300&&py5==50){ }else{return; }
if(px6==350&&py6==100){ }else{return; }
if(px7==300&&py7==150){ }else{return; }
if(px8==50&&py8==200){ }else{return; }
if(px9==100&&py9==250){ }else{return; }
if(px10==250&&py10==200){ }else{return; }
if(px11==350&&py11==200){ }else{return; }
if(px12==450&&py12==200){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 1
if (mode==2){
if(px1==400&&py1==50){ }else{return; }
if(px2==400&&py2==250){ }else{return; }
if(px3==400&&py3==150){ }else{return; }
if(px4==200&&py4==100){ }else{return; }
if(px5==50&&py5==100){ }else{return; }
if(px6==300&&py6==150){ }else{return; }
if(px7==100&&py7==100){ }else{return; }
if(px8==50&&py8==50){ }else{return; }
if(px9==100&&py9==250){ }else{return; }
if(px10==350&&py10==50){ }else{return; }
if(px11==200&&py11==200){ }else{return; }
if(px12==200&&py12==50){ }else{return; }
s6=" Congratulations on finishing the game : "+s3;
ss=" Fabulous !! Congratulations on finishing the game : "+s3;
msgBox (" Brain block ",ss);
pn=13; showtimes (); }//mode 2
idemo=1; //lock show finished
drawboard (); //show finished
}//detect_finished ()
showtimes (){
getTime (tim);
newhh=tim[0];
newmm=tim[1];
newss=tim[2];
hhts=intToString (tim[0]);
mmts=intToString (tim[1]);
ssts=intToString (tim[2]);
if (newhh<10)hhts="0"+hhts;
if (newmm<10)mmts="0"+mmts;
if (newss<10)ssts="0"+ssts;
mms=((newhh-oldhh)*3600)+
((newmm-oldmm)*60)+((newss-oldss));
if (mms<0) mms=mms+864000;
thh=mms/3600;
tmm=(mms-thh*2600)/60;
tss=mms-thh*3600-tmm*60;
ss1=intToString (tmm)+" branch "+intToString (tss)+" second ";
ss2=hhts+" : "+mmts+" : "+ssts;
ts1= " complete > "+ss2;
ts2= " when > "+ss1;
pn=13; //drawboard () show ts1,ts2
}//showtimes ()
drawcover (){
cs.ClearDraw (0,src);
// cs.SetStrokeWidth (2);
cs.SetFillMode (1);
cs.SetColor(255,180,80,250);
cs.DrawRect (0,2,729,1090);
cs.SetStrokeWidth(1);
cs.SetColor (255,120,120,120);
cs.DrawRect (77,77,514,353);
cs.SetColor (255,250,250,250);
cs.DrawRect (72,72,509,348);
cs.SetTextSize (104);
cs.SetColor (255,100,100,100);
cs.DrawText (" Brain block ",54,724);
cs.SetColor (255,250,250,0);
cs.DrawText (" Brain block ",50,720);
cs.SetTextSize (32);
s="@copyright version 2.71";
cs.DrawText (s,130,780);
cs.DrawRect (4,930,714,933);
s=" Compiler : Uncle Zhang Chunshu ( [email protected] )";
cs.DrawText (s,20,970);
cs.SetFillMode (0);
cs.SetColor (255,20,250,20);
cs.SetTextSize (104);
cs.DrawText (" Brain block ",50,720);
cs.SetColor (255,0,120,0);
cs.SetTextSize (32);
s="@copyright version 2.71";
cs.DrawText (s,130,780);
for (i=1;i<11;i++){ //draw board grids *******
for (j=1;j<7;j++){
cs.DrawRect (i*40+50,j*40+50,i*40+88,j*40+88); } }
cs.DrawRect (83,83,496,335);
cs.SetColor (255,220,220,220);
cs.SetFillMode (1);
draw_button (); //draw buttons & small blocks
cs.SetColor (255,250,250,250);
for (i=1;i<14;i++){ //draw button number
cs.DrawCircle (627,i*60-20,19); }
cs.SetColor (255,250,150,20); //B5 repair *******
cs.DrawRect (635,266,705,281);
cs.SetColor (255,250,0,0); //sB1********
cs.DrawRect (130,130,248,168);
cs.DrawRect (130,130,168,248);
cs.SetColor (255,0,250,0); //sB2********
cs.DrawRect (250,250,328,288);
cs.DrawRect (250,250,288,368);
cs.DrawRect (250,330,328,368);
cs.SetColor (255,250,250,0); //sB3********
cs.DrawRect (330,290,448,328);
cs.DrawRect (370,250,408,368);
cs.SetColor (255,0,0,250); //sB8********
cs.DrawRect (370,490,488,528);
cs.DrawRect (370,450,408,568);
cs.SetColor (255,150,50,250); //B6*******
cs.DrawRect (330,90,489,129);
cs.DrawRect (450,90,489,169);
cs.SetColor (255,250,0,250); //sB11********
cs.DrawRect (170,450,248,488);
cs.DrawRect (170,450,208,568);
cs.DrawRect (130,530,208,568);
//draw button Draw a button gradient
cs.SetColor (255,250,250,250);
int dy; // The starting position
dy=820;
cs.DrawRect (240,dy,481,dy+60);
cs.SetColor (255,250,0,0);
for (i=1;i<60;i++){ // Button gradient
cs.SetColor (255,240-i*4,240-i*3,250-i*4);
cs.DrawLine (241,dy+i,480,dy+i);
}
cs.SetColor(255,255,250,0);
cs.SetTextStyle (1);
cs.SetTextSize (32);
cs.DrawText (" open beginning swim Play ",290,dy+40);
cs.Update ();
}//drawcover ()
myMenuProc(int nMen,int nContext)
{
if(nMen==200){//New game
cs.ClearDraw (0,src);
newgame ();
drawboard (); }
if(nMen==201){//mode + +
mode=mode+1;
if (mode>36)mode=36;
k=(int)mode;
s=intToString (k);
s3=" Pattern mode = "+s;
newgame ();
drawboard ();
}
if(nMen==202){//mode - -
mode=mode-1;
if (mode<1) mode=1;
k=(int)mode;
s=intToString (k);
s3=" Pattern mode = "+s;
newgame ();
drawboard ();
}
if (nMen==203){//select mode
dmode=doubleInput(" Mode selection mode 1 - 34 "," Input format : Numbers 1 ... > 34 (m1-20: 10 * 6) (m20-30: 5 * 12) (m31-34: 4 * 15 ; m35-36: 3 * 20)\n Input is [ empty ] Then cancel ");
if(dmode==0) {return; }else{mode=dmode; }
if (dmode>36)mode=36;
k=(int)mode;
s=intToString (k);
s3=" Pattern mode = "+s;
newgame ();
drawboard ();
}
if (nMen==204){// Show sample
showdemo ();
setDisplay (1);
}
if(nMen==205){// Save image
setDisplay (1);
savepic ();
}
if(nMen==206){// Version information
setDisplay (1);
drawcover ();
}
if (nMen==207){//Exit
clearOutput();
cs.ClearDraw (0,src);
exit (0);
}
}//myMenu()
myToolBarProc(int nBtn,int nContext){
if(nBtn==100){//New game
cs.ClearDraw (0,src);
newgame ();
drawboard (); }
if(nBtn==101){//pn + +
pn=pn+1;
if (pn>13) pn=13;
s=intToString(pn);
s4=" Block number (pn) : "+s;
drawboard ();
}
if(nBtn==102){//pn - -
pn=pn-1;
if (pn<1) pn=1;
s=intToString(pn);
s4=" Block number (pn) : "+s;
drawboard ();
}
if(nBtn==103){//select mode 1 to .... > 34
dmode=doubleInput(" Mode selection mode 1 - 34 "," Input format : Numbers 1 ... > 34 (m1-20: 10 * 6) (m20-30: 5 * 12) (m31-34: 4 * 15 ; m35-36: 3 * 20)\n Input is [ empty ] Then cancel ");
if(dmode==0) {return; }else{mode=dmode; }
if (dmode>36)mode=36;
k=(int)mode;
s=intToString (k);
s3=" Pattern mode = "+s;
newgame ();
drawboard ();
}
if(nBtn==104){// Exit procedure
clearOutput();
cs.ClearDraw (0,src);
setDisplay (0);
exit (0);
}
if(nBtn==105){// Version information
setDisplay (1);
drawcover ();
}
}//my toolbar()
savepic (){
filebox.SetTitle(" Save the picture (*.bmp;*.jpg;*.png)");
filebox.SetFilter("*.jpg;*.bmp;*.png");
filebox.SetMode(1);
filebox.Show();
if(filebox.GetCount()==1){
fname=filebox.GetFileName(0);
cs.SaveBitmap(fname); }
}//savepic ()
边栏推荐
- 024.static and final use traps continued
- Microcomputer principle and technology Interface Experiment four subroutines and interrupt experiment
- Send blocking, receive blocking
- Kunlunbase online meetup is waiting for you~
- Leetcode 1328. Destroy palindrome string (yes, solved)
- Time consuming test of construction and sorting of set, vector and list
- Docker install MySQL
- Wechat applet cloud development 1 - Database
- 使用原生js实现按钮的全选功能,简单清晰
- es安装ik分词器
猜你喜欢
随机推荐
2022 National latest fire-fighting facility operator (intermediate fire-fighting facility operator) simulation test questions and answers
The concept of binary tree and three traversal methods (C language)
LeetCode_216_组合总和Ⅲ
MapGIS IGServer九州-驾驭国产化环境下的拓展服务开发
Leetcode skimming -- find and minimum k-pair number 373 medium
02-3、指針和引用的區別
Redis distributed cache redis cluster
LeetCode_17_电话号码的字母组合
Tikv memory parameter performance tuning
[embedded unit test] construction of C language unit test framework
02-2. Default parameters, function overloading, reference, implicit type conversion, about error reporting
HCIP(6)
es安装ik分词器
Leetcode 20. 有效的括号
Nature子刊 | 地下水固碳速率与寡营养海洋系统固碳速率相近
Baidu document translation API
Solve the problem that QQ mail and Thunderbird cannot log in to outlook
How to build dashboard and knowledge base in double chain note taking software? Take the embedded widget library notionpet as an example
Research on downlink spectrum efficiency of 6G space earth integrated network high altitude platform base station
01背包面试题系列(一)








