hi!
我叫方通晟
hello!
有礼貌啊!
%%%%%%%%
////////////////////////////////////////// ////////////////////////////////////////// ////////////////////////////////////////// //////////////////////////////////////////
1234567890 0987654321 1234567890 0987654321 123456789 0987654321 123456789 0987654321
代码c++:
Can copy
//new 10.0
###############################
#code:如下!!!
#include<bits/stdc++.h> #include<windows.h> //GetAsyncKeyState using namespace std; int sz[10][10][10]={ { {’ ’,'','','',’ ’}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {’ ’,'','','',’ ’}, }, { {’ ’,’ ’,'',’ ’,’ ’}, {’ ’,'','',’ ’,’ ’}, {’ ’,’ ’,'',’ ’,’ ’}, {’ ’,’ ’,'',’ ’,’ ’}, {’ ’,’ ’,'',’ ’,’ ’}, {’ ’,’ ’,'',’ ’,’ ’}, {'','','','',''}, }, { {’ ’,'','','',’ ’}, {'',’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,'',’ ’}, {’ ’,’ ’,'',’ ’,’ ’}, {’ ’,'',’ ’,’ ’,’ ’}, {'','','','',''}, }, { {’ ’,'','','',’ ’}, {'',’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,'','','',’ ’}, {’ ’,’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {’ ’,'','','',’ ’}, }, { {'',’ ’,’ ’,'',’ ’}, {'',’ ’,’ ’,'',’ ’}, {'',’ ’,’ ’,'',’ ’}, {'','','','',''}, {’ ’,’ ’,’ ’,'',’ ’}, {’ ’,’ ’,’ ’,'',’ ’}, {’ ’,’ ’,’ ’,'',’ ’}, }, { {'','','','',''}, {'',’ ’,’ ’,’ ’,’ ’}, {'',’ ’,’ ’,’ ’,’ ’}, {’ ’,'','','',’ ’}, {’ ’,’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {’ ’,'','','',’ ’}, }, { {’ ’,'','','',’ ’}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,’ ’}, {'','','','',’ ’}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {’ ’,'','','',’ ’}, }, { {'','','','',’ ’}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,’ ’,''}, }, { {’ ’,'','','',’ ’}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {’ ’,'','','',’ ’}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {’ ’,'','','',’ ’}, }, { {’ ’,'','','',’ ’}, {'',’ ’,’ ’,’ ’,''}, {'',’ ’,’ ’,’ ’,''}, {’ ’,'','','',''}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,’ ’,’ ’,’ ’,''}, {’ ’,'','',’*’,’ ’}, } }; int speed=10; int gx[8]={3,1,3,10,10,17,20,17}; int gy[8]={3,10,17,1,20,3,10,17}; int ddgx[8]={3,1,3,10,10,17,20,17}; int ddgy[8]={3,10,17,1,20,3,10,17}; int yj=10; int xj=10; int x=10,y=10; int nx,ny; int ans=0; string a; int l; int ansss[10][1000]; char shuru[1000]; bool xxxxx=0; void jz() { for(int z=0;z<=3;z++) { int pos=shuru[z]-‘0’; //cout<<pos; for(int i=0;i<=6;i++) { for(int j=0;j<=4;j++) { ansss[i][j+l]=sz[pos][i][j]; } } l+=8; } } void gmove(int aaa) { int chax=abs(x-gx[aaa]); int chay=abs(y-gy[aaa]); if(chax>chay) { if(gx[aaa]>x)gx[aaa]—; else gx[aaa]++; } else { if(gy[aaa]>y)gy[aaa]—; else gy[aaa]++; } } bool pd()
{ for(int wertwet=0;wertwet<8;wertwet++) { if(gx[wertwet]==x&&gy[wertwet]==y) return 1; } return 0; } bool sdsd; int main() { srand((unsigned long long)time(0) );
int keyyy=1000+rand()%9000;
sprintf((char*)shuru,"%d",keyyy);
jz();
for(int i=0;i<=6;i++)
{
for(int j=0;j<=l;j++) printf("%c",ansss[i][j]);
printf("\n");
}
printf("输入验证码:");
int keyy;
cin>>keyy;
if(keyy!=keyyy)
{
system("cls");
printf("ERROR.Torn to the end.");
return 0;
}
printf("sound?(y/n)\n");
while(1)
{
if(GetAsyncKeyState('y')&0x8000!=0||GetAsyncKeyState('Y')&0x8000!=0)
{
sdsd=1;
break;
}
if(GetAsyncKeyState('n')&0x8000!=0||GetAsyncKeyState('N')&0x8000!=0)
{
break;
sdsd=0;
}
}
int lll=0;
printf("game start!\n");
system("pause");
system("mode con:cols=44 lines=28");
system("color f0");
system("title 八鬼擒人");
bool xxx=1;
int fx;
fx=1;
while(1)
{
nx=rand()%18+2;
ny=rand()%18+2;
while(1)
{
xxx=!xxx;// if(xxx==1)system(“color 46”); // else system(“color 64”); if(GetAsyncKeyState(VK_UP)&0x8000!=0 ) fx=1;//x—; if(GetAsyncKeyState(VK_DOWN)&0x8000!=0 ) fx=2;//x++; if(GetAsyncKeyState(VK_LEFT)&0x8000!=0 ) fx=3;//y—; if(GetAsyncKeyState(VK_RIGHT)&0x8000!=0 ) fx=4;//y++; if(GetAsyncKeyState(‘1’)&0x8000!=0&&speed!=500) speed++; if(GetAsyncKeyState(‘2’)&0x8000!=0&&speed!=10) speed—;
if(fx==1)x--;
if(fx==2)x++;
if(fx==3)y--;
if(fx==4)y++;
if(xxx)xxxxx=!xxxxx;
if(xxxxx)for(int qq=0;qq<8;qq++)gmove(qq);
if(pd()||x==0||x==21||y==0||y==21)
{
system("cls");
printf("game over!");
if(sdsd==1)
Beep(500,1000);
else Sleep(1000);
system("pause");
for(int i=0;i<8;i++)
{
gx[i]=ddgx[i];
gy[i]=ddgy[i];
}
x=10;y=10;
//ans=0;
nx=rand()%20+1;
ny=rand()%20+1;
lll=0;
system("color f0");
//return 0;
}
printf("1--fast 2--slow\n");
printf("############################################\n");
for(int i=1;i<=20;i++)
{
printf("##");
for(int j=1;j<=20;j++)
{
if(x==i&&y==j)
{
printf("你");
}
else if(i==gx[0]&&j==gy[0])printf("鬼");
else if(i==gx[1]&&j==gy[1])printf("鬼");
else if(i==gx[2]&&j==gy[2])printf("鬼");
else if(i==gx[3]&&j==gy[3])printf("鬼");
else if(i==gx[4]&&j==gy[4])printf("鬼");
else if(i==gx[5]&&j==gy[5])printf("鬼");
else if(i==gx[6]&&j==gy[6])printf("鬼");
else if(i==gx[7]&&j==gy[7])printf("鬼");
else if(i==nx&&j==ny)
{
printf("$$");
}
else printf(" ");
}
printf("##");
printf("\n");
}
printf("############################################\n");
printf(" score:%d",ans);
if(GetAsyncKeyState(' ')&0x8000!=0)
{
Sleep(1000);
while(!(GetAsyncKeyState(' ')&0x8000!=0))
{
Sleep(20);
}
}
if(sdsd==0)Sleep(1000/speed);
if(sdsd==1)
{
if(xxxxx==1) Beep(500,1000/speed);
else Sleep(1000/speed);
}
system("cls");
if(x==nx&&y==ny)
{
ans+=10;
break;
}
if(lll==150)system("title 大小鬼们,归位!");
if(lll>150&&lll<180)
{
if(lll%2==1) system("color 48");
else system("color 84");
}
if(lll==180)
{
lll=0;
for(int i=0;i<8;i++)
{
gx[i]=ddgx[i];
gy[i]=ddgy[i];
}
system("color f0");
system("title 加油!");
}
lll++;
}
}
return 0;}
//(end) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////