📄 pipe.cpp
字号:
(B[x1][y1-1].sign==5)||
(B[x1][y1-1].sign==7))
B[x1][y1-1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2;
y1=y2-1;
}
count3_2=24;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+count3_2;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count3_2--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
break;
case 3:
B[x1][y1].select=FALSE;
if((y1==(y2+1))&&(x1==x2))
if(count3_1>24)
{
B[x1][y1].correct=FALSE;
if((y1+1)>14) out=TRUE;
else
{
if((B[x1][y1+1].sign==2)||
(B[x1][y1+1].sign==3)||
(B[x1][y1+1].sign==4)||
(B[x1][y1+1].sign==6))
B[x1][y1+1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2;
y1=y2+1;
}
count3_1=0;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+count3_1;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count3_1++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
if((y1==(y2-1))&&(x1==x2))
if(count3_2<0)
{
B[x1][y1].select=FALSE;
B[x1][y1].correct=FALSE;
if((y1-1)<0) out=TRUE;
else
{
if((B[x1][y1-1].sign==2)||
(B[x1][y1-1].sign==3)||
(B[x1][y1-1].sign==5)||
(B[x1][y1-1].sign==7))
B[x1][y1-1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2;
y1=y2-1;
}
count3_2=24;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+count3_2;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count3_2--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
if((x1==(x2+1))&&(y1==y2))
if(count3_1>24)
{
B[x1][y1].select=FALSE;
B[x1][y1].correct=FALSE;
if((x1+1)>6) out=TRUE;
else
{
if((B[x1+1][y1].sign==3)||
(B[x1+1][y1].sign==4)||
(B[x1+1][y1].sign==5)||
(B[x1+1][y1].sign==8))
B[x1+1][y1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2+1;
y1=y2;
}
count3_1=0;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count3_1;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count3_1++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
if((x1==(x2-1))&&(y1==y2))
if(count3_2<0)
{
B[x1][y1].select=FALSE;
B[x1][y1].correct=FALSE;
if((x1-1)<0) out=TRUE;
else
{
if((B[x1-1][y1].sign==3)||
(B[x1-1][y1].sign==6)||
(B[x1-1][y1].sign==7)||
(B[x1-1][y1].sign==8))
B[x1-1][y1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2-1;
y1=y2;
}
count3_2=24;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count3_2;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count3_2--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
break;
case 4:
B[x1][y1].select=FALSE;
if((y1==(y2+1))&&(x1==x2))
if(count4_1>13)
if(count4_2<0)
{
B[x1][y1].correct=FALSE;
if((x1-1)<0) out=TRUE;
else
{
if((B[x1-1][y1].sign==8)||
(B[x1-1][y1].sign==3)||
(B[x1-1][y1].sign==6)||
(B[x1-1][y1].sign==7))
B[x1-1][y1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2-1;
y1=y2;
}
count4_1=0;
count4_2=9;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count4_2;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count4_2--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
else
{
rect.left=big_x+bmp_size*y1+count4_1;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count4_1++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
if((x1==(x2+1))&&(y1==y2))
if(count4_1>14)
if(count4_2<0)
{
B[x1][y1].select=FALSE;
B[x1][y1].correct=FALSE;
if((y1-1)<0) out=TRUE;
else
{
if((B[x1][y1-1].sign==2)||
(B[x1][y1-1].sign==3)||
(B[x1][y1-1].sign==5)||
(B[x1][y1-1].sign==7))
B[x1][y1-1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2;
y1=y2-1;
}
count4_1=0;
count4_2=9;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+count4_2;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count4_2--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count4_1;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count4_1++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
break;
case 5:
B[x1][y1].select=FALSE;
if((y1==(y2-1))&&(x1==x2))
if(count5_1<10)
if(count5_2<0)
{
B[x1][y1].correct=FALSE;
if((x1-1)<0) out=TRUE;
else
{
if((B[x1-1][y1].sign==3)||
(B[x1-1][y1].sign==6)||
(B[x1-1][y1].sign==7)||
(B[x1-1][y1].sign==8))
B[x1-1][y1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2-1;
y1=y2;
}
count5_1=24;
count5_2=9;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count5_2;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count5_2--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
else
{
rect.left=big_x+bmp_size*y1+count5_1;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count5_1--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
if((x1==(x2+1))&&(y1==y2))
if(count5_3>14)
if(count5_4>24)
{
B[x1][y1].select=FALSE;
B[x1][y1].correct=FALSE;
if((y1+1)>14) out=TRUE;
else
{
if((B[x1][y1+1].sign==2)||
(B[x1][y1+1].sign==3)||
(B[x1][y1+1].sign==4)||
(B[x1][y1+1].sign==6))
B[x1][y1+1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2;
y1=y2+1;
}
count5_3=0;
count5_4=14;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+count5_4;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count5_4++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count5_3;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count5_3++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
break;
case 6:
B[x1][y1].select=FALSE;
if((y1==(y2+1))&&(x1==x2))
if(count6_1>13)
if(count7_2>24)
{
B[x1][y1].correct=FALSE;
if((x1+1)>6) out=TRUE;
else
{
if((B[x1+1][y1].sign==3)||
(B[x1+1][y1].sign==4)||
(B[x1+1][y1].sign==5)||
(B[x1+1][y1].sign==8))
B[x1+1][y1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2+1;
y1=y2;
}
count6_1=0;
count7_2=14;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count7_2;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count7_2++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
else
{
rect.left=big_x+bmp_size*y1+count6_1;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count6_1++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
if((x1==(x2-1))&&(y1==y2))
if(count6_3<10)
if(count6_4<0)
{
B[x1][y1].select=FALSE;
B[x1][y1].correct=FALSE;
if((y1-1)<0) out=TRUE;
else
{
if((B[x1][y1-1].sign==2)||
(B[x1][y1-1].sign==3)||
(B[x1][y1-1].sign==5)||
(B[x1][y1-1].sign==7))
B[x1][y1-1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2;
y1=y2-1;
}
count6_3=24;
count6_4=9;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+count6_4;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count6_4--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count6_3;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count6_3--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
break;
case 7:
B[x1][y1].select=FALSE;
if((y1==(y2-1))&&(x1==x2))
if(count7_1<10)
if(count7_2>24)
{
B[x1][y1].correct=FALSE;
if((x1+1)>6) out=TRUE;
else
{
if((B[x1+1][y1].sign==3)||
(B[x1+1][y1].sign==4)||
(B[x1+1][y1].sign==5)||
(B[x1+1][y1].sign==8))
B[x1+1][y1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2+1;
y1=y2;
}
count7_1=24;
count7_2=14;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+10;
rect.top=big_y+bmp_size*x1+count7_2;
rect.right=big_x+bmp_size*y1+15;
rect.bottom=rect.top+1;
count7_2++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,11);
ReleaseDC(hwnd,hDC);
}
else
{
rect.left=big_x+bmp_size*y1+count7_1;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count7_1--;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
if((x1==(x2-1))&&(y1==y2))
if(count7_1<10)
if(count7_2>24)
{
B[x1][y1].select=FALSE;
B[x1][y1].correct=FALSE;
if((y1+1)>14) out=TRUE;
else
{
if((B[x1][y1+1].sign==2)||
(B[x1][y1+1].sign==3)||
(B[x1][y1+1].sign==4)||
(B[x1][y1+1].sign==6))
B[x1][y1+1].correct=TRUE;
x2=x1;
y2=y1;
x1=x2;
y1=y2+1;
}
count7_1=24;
count7_2=14;
sum=sum+6;
}
else
{
rect.left=big_x+bmp_size*y1+count7_2;
rect.top=big_y+bmp_size*x1+10;
rect.right=rect.left+1;
rect.bottom=big_y+bmp_size*x1+15;
count7_2++;
hDC=GetDC(hwnd);
Draw1(hwnd,hDC,12);
ReleaseDC(hwnd,hDC);
}
else
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -