Lv.1
天空属于哈夫克
签名:QQ:2521312343 目前居住在地球(?
在 c++而简单加密 中回复
打个广告(用dev运行,喵站不支持这个程序的某些内容)(求点赞)(和下文连在一起)
#include<iostream>
#include<windows.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
#define jp(x) ((GetAsyncKeyState(x)&0x8000)?1:0)
#define CLS color(112),system("cls");
using namespace std;
int clearma[105][105] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };
int ma[105][105] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1},
{0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,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8,5,8,8,5,8,8,8,8,8,5,8,8,8,8,8,8},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} };
int ma11[105][105] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,7},
{0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,5,9,0,0,0,0,0,0,6,5,7},
{0,0,0,0,0,0,0,0,0,0,0,0,1,5,0,0,0,0,0,0,0,0,0,5,5,7},
{0,0,0,0,0,0,0,0,0,1,5,0,1,0,0,0,0,0,5,0,0,0,0,0,5,7},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,7},
{0,0,1,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7},
{0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7},
{1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,1,5,1,1,5,1,1,1,1,1,1} };
//8冰,9细雪
int rec[105];
int turn = 0;//0左,2右
bool jumphigher = false;
int manum = 1;
int blood = 100, maxblood = 100;
int nowx = 7, nowy = 0;
int tim;2024-08-24T23:08:00 点赞:0
在 c++而简单加密 中回复
下文2: structButton { intx,y,color; constchar*name; intlen; }; inlinevoidGetPos(POINT&pt) { HWNDhwnd=GetForegroundWindow(); GetCursorPos(&pt); ScreenToClient(hwnd,&pt); pt.y=pt.y/16; pt.x=pt.x/8; } inlinevoidcolor(inta) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a); } inlinevoidgto(intx,inty) { COORDpos; pos.X=y; pos.Y=x; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos); } inlineButtonNewButton(intx,inty,intcolor,constchar*name) { Buttont; t.x=x; t.y=y; t.name=name; t.color=color; t.len=strlen(name); gto(x,y),cout<<name; returnt; } inlineboolPreserve(ButtonA) { gto(A.x,A.y),color(A.color); POINTpt; GetPos(pt); if(pt.y==A.x&&(pt.x>=A.y&&pt.x<=A.y+A.len)) { if(KEY_DOWN(MOUSE_MOVED))return1; } return0; } inlinevoiddis_mouse() { ShowCursor(false); HANDLEhOut=GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_CURSOR_INFOcci; GetConsoleCursorInfo(hOut,&cci); cci.bVisible=false; SetConsoleCursorInfo(hOut,&cci); } inlinevoidprint(intx,inty,stringc) { y*=2; HANDLEhOut;COORDpos; hOut=GetStdHandle(STD_OUTPUT_HANDLE); pos.X=y;pos.Y=x; SetConsoleCursorPosition(hOut,pos); cout<<c; } inlinevoidprintmap() { system("cls"); for(registerinti=0;i<=8;i++) { for(registerintj=0;j<=25;j++) { if(ma[i][j]==0)print(i,j,""); if(ma[i][j]==1)print(i,j,"■"); if(ma[i][j]==2)print(i,j,"Ω"); if(ma[i][j]==4)print(i,j,"Ψ"); if(ma[i][j]==5)print(i,j,"Λ"); if(ma[i][j]==6)print(i,j,"Θ"); if(ma[i][j]==7)print(i,j,"▓"); if(ma[i][j]==8)color(3),print(i,j,"■"),color(7); if(ma[i][j]==9)color(8),print(i,j,"■"),color(7); } puts(""); } print(nowx,nowy,"○"); print(9,0,""); printf("level:%d\n",manum); printf("blood:"); for(registerinti=1;i<=blood;i++) printf("■"); for(registerinti=blood;i<maxblood;i++) printf("□"); if(manum==9)print(9,21,"bylyxsky"); if(manum==12)print(9,19,"by无名の蒟蒻"); color(7); } inlineintchangemap() { print(4,11,"win!"); Sleep(1024); if(manum==12) { system("cls"); print(0,0,"movev2.2.1"); print(4,0,">开始游戏"); print(6,0,">游戏规则"); print(8,0,">退出游戏"); print(10,0,">查看记录"); return10; } if(manum==11) { rec[manum]=min(int(clock()-tim),rec[manum]); for(registerinti=0;i<=8;i++) for(registerintj=0;j<=25;j++) ma[i][j]=ma11[i][j]; nowx=7,nowy=0; manum=12; printmap(); tim=clock(); return0; } if(manum==10) { rec[manum]=min(int(clock()-tim),rec[manum]); for(registerinti=0;i<=8;i++) for(registerintj=0;j<=25;j++) ma[i][j]=ma10[i][j]; nowx=7,nowy=0; manum=11; printmap(); tim=clock(); return0; } if(manum==9) { rec[manum]=min(int(clock()-tim),rec[manum]); for(registerinti=0;i<=8;i++) for(registerintj=0;j<=25;j++) ma[i][j]=ma9[i][j]; nowx=7,nowy=0; manum=10; printmap(); tim=clock(); return0; }
2024-08-24T23:08:28 点赞:0
在 c++而简单加密 中回复
下文3:
if (manum == 8)
{
rec[manum] = min(int(clock() - tim), rec[manum]);
for (register int i = 0; i <= 8; i++)
for (register int j = 0; j <= 25; j++)
ma[i][j] = ma8[i][j];
nowx = 7, nowy = 0;
manum = 9;
printmap();
tim = clock();
return 0;
}
if (manum == 7)
{
rec[manum] = min(int(clock() - tim), rec[manum]);
for (register int i = 0; i <= 8; i++)
for (register int j = 0; j <= 25; j++)
ma[i][j] = ma7[i][j];
nowx = 7, nowy = 0;
manum = 8;
printmap();
tim = clock();
return 0;
}
if (manum == 6)
{
rec[manum] = min(int(clock() - tim), rec[manum]);
for (register int i = 0; i <= 8; i++)
for (register int j = 0; j <= 25; j++)
ma[i][j] = ma6[i][j];
nowx = 7, nowy = 0;
manum = 7;
printmap();
tim = clock();
return 0;
}
if (manum == 5)
{
rec[manum] = min(int(clock() - tim), rec[manum]);
for (register int i = 0; i <= 8; i++)
for (register int j = 0; j <= 25; j++)
ma[i][j] = ma5[i][j];
nowx = 7, nowy = 0;
manum = 6;
printmap();
tim = clock();
return 0;
}
if (manum == 4)
{
rec[manum] = min(int(clock() - tim), rec[manum]);
for (register int i = 0; i <= 8; i++)
for (register int j = 0; j <= 25; j++)
ma[i][j] = ma4[i][j];
nowx = 7, nowy = 0;
manum = 5;
printmap();
tim = clock();
return 0;
}
if (manum == 3)
{
rec[manum] = min(int(clock() - tim), rec[manum]);
for (register int i = 0; i <= 8; i++)
for (register int j = 0; j <= 25; j++)
ma[i][j] = ma3[i][j];
nowx = 7, nowy = 0;
manum = 4;
printmap();
tim = clock();
return 0;
}
if (manum == 2)
{
rec[manum] = min(int(clock() - tim), rec[manum]);
for (register int i = 0; i <= 8; i++)
for (register int j = 0; j <= 25; j++)
ma[i][j] = ma2[i][j];
nowx = 7, nowy = 0;
manum = 3;
printmap();
tim = clock();
return 0;
}
if (manum == 1)
{
rec[manum] = min(int(clock() - tim), rec[manum]);
for (register int i = 0; i <= 8; i++)
for (register int j = 0; j <= 25; j++)
ma[i][j] = ma1[i][j];
nowx = 7, nowy = 0;
manum = 2;
printmap();
tim = clock();
return 0;
}
}
int main()
{
srand(time(NULL));
dis_mouse();
system("title move v2.3");
system("mode con cols=53 lines=13");
print(0, 0, "move v2.2.1");
Button goout = NewButton(4, 0, 7, ">开始游戏");
Button rule = NewButton(6, 0, 7, ">游戏规则");
Button start = NewButton(8, 0, 7, ">退出游戏");
Button red = NewButton(10, 0, 7, ">查看记录");
while (1)
{
system("title move v2.2.1");
if (Preserve(rule))
{
system("cls");
Sleep(100);
print(0, 0, "游戏规则");
print(2, 0, "AWSD移动");
print(3, 0, "Ψ为跳跃加强");
print(4, 0, "Λ为刺 ");
print(5, 0, "Θ为血包 ");
print(6, 0, "Ω为终点 ");
print(7, 0, "▓为藤蔓 ");
color(3), print(8, 0, "■"), color(7);
print(8, 1, "为冰块");
color(8), print(9, 0, "■"), color(7);
print(9, 1, "为细雪");
print(10, 0, "按Q返回起点");
print(11, 0, "按Shift蹲下");
Button back = NewButton(12, 0, 7, "返回");
while (1)
{
if (Preserve(back))
{
system("cls");
print(0, 0, "move v2.2.1");
print(4, 0, ">开始游戏");
print(6, 0, ">游戏规则");
print(8, 0, ">退出游戏");
print(10, 0, ">查看记录");
break;
}
}
Sleep(100);
}
if (Preserve(goout))
{
system("cls");
system("title bye~");
return 0;
}
if (Preserve(start))
{
memset(rec, 0x7f, sizeof(rec));
color(7);
printmap();
tim = clock();
while (1)
{
if (blood == 0)
{
// ma[nowx][nowy]=0;
nowx = 7, nowy = 0;
print(nowx, nowy, "○");
blood = 100;
printmap();
}
if (jp(16))turn = 3;
if (ma[nowx][nowy] == 4)jumphigher = true;
if (ma[nowx][nowy] == 6)blood = min(blood + 1, maxblood), ma[nowx][nowy] = 0, print(nowx, nowy, " "), printmap();
if (ma[nowx][nowy] == 2)if (changemap())break;;
if (jp('Q'))
{
print(nowx, nowy, " ");
nowx = 7;
nowy = 0;
printmap();
print(nowx, nowy, "○");
}
if (ma[nowx + 1][nowy] == 5 && ma[nowx][nowy] != 7)//下面有刺
{
blood--;
print(nowx, nowy, " ");
int a = rand() % 2;
Sleep(500);
if (a == 0)
{
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5)nowy++;
print(nowx, nowy, "○");
}
else
{
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5)nowy--;
print(nowx, nowy, "○");
}
printmap();
}
if (ma[nowx + 1][nowy] != 1 && ma[nowx][nowy] != 7 && ma[nowx + 1][nowy] != 5 && ma[nowx + 1][nowy] != 8 && ma[nowx + 1][nowy] != 9)//控制下落
{
print(nowx, nowy, " ");
print(nowx + 1, nowy, "○");
nowx++;
Sleep(50);
}2024-08-24T23:08:53 点赞:0
在 c++而简单加密 中回复
下文4:
if (ma[nowx + 1][nowy] == 8)
{
if (turn == 0)
{
print(nowx, nowy, " ");
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
}
if (turn == 1)
{
print(nowx, nowy, " ");
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
}
Sleep(喵);
}
if (jp('A'))//向左走
{
turn = 0;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(50);
if (ma[nowx + 1][nowy] == 9)Sleep(132);
}
if (jp('D'))//向右走
{
turn = 1;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(50);
if (ma[nowx + 1][nowy] == 9)Sleep(132);
}
if (jp('S') && ma[nowx][nowy] == 7 && ma[nowx + 1][nowy] != 1 && ma[nowx + 1][nowy] != 8 && ma[nowx + 1][nowy] != 9)//向下走(只在藤蔓上有效
{
if (ma[nowx][nowy + 1] == 5)
{
blood--;
continue;
}
print(nowx, nowy, "▓");
nowx++;
print(nowx, nowy, "○");
Sleep(60);
}
if (jp('W'))//跳跃
{
// system("cls");
if (ma[nowx - 1][nowy] == 7)
{
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowx--;
print(nowx, nowy, "○");
Sleep(60);
continue;
}
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowx--;
if (ma[nowx][nowy] == 4)jumphigher = true;
if (ma[nowx][nowy] == 6)blood = min(blood + 1, maxblood), ma[nowx][nowy] = 0, print(nowx, nowy, " "), printmap();
if (ma[nowx][nowy] == 2)if (changemap())break;;
if (nowx < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowx++;
print(nowx, nowy, "○");
// printmap();
Sleep(10);
if (jp('A'))//向左走
{
turn = 0;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(10);
}
if (jp('D'))//向右走
{
turn = 1;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(10);
}
// system("cls");
if (ma[nowx - 1][nowy] == 7)
{
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowx--;
print(nowx, nowy, "○");
Sleep(10);
continue;
}
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowx--;
if (ma[nowx][nowy] == 4)jumphigher = true;
if (ma[nowx][nowy] == 6)blood = min(blood + 1, maxblood), ma[nowx][nowy] = 0, print(nowx, nowy, " "), printmap();
if (ma[nowx][nowy] == 2)if (changemap())break;;
if (nowx < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowx++;
print(nowx, nowy, "○");
// printmap();
if (jumphigher)Sleep(10);
else Sleep(10);
if (jp('A'))//向左走
{
turn = 0;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(10);
}
if (jp('D'))//向右走
{
turn = 1;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(10);
}
if (ma[nowx][nowy] == 4)jumphigher = true;
if (ma[nowx][nowy] == 6)blood = min(blood + 1, maxblood), ma[nowx][nowy] = 0, print(nowx, nowy, " "), printmap();
if (ma[nowx][nowy] == 2)if (changemap())break;;
if (jumphigher)
{
//system("cls");
if (ma[nowx - 1][nowy] == 7)
{
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowx--;
print(nowx, nowy, "○");
Sleep(10);
continue;
}
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
print(nowx, nowy, " ");
nowx--;
if (ma[nowx][nowy] == 4)jumphigher = true;
if (ma[nowx][nowy] == 6)blood = min(blood + 1, maxblood), ma[nowx][nowy] = 0, print(nowx, nowy, " "), printmap();
if (ma[nowx][nowy] == 2)if (changemap())break;;
if (nowx < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowx++;
print(nowx, nowy, "○");
//printmap();
Sleep(90);
if (jp('A'))//向左走
{
turn = 0;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(10);
}2024-08-24T23:09:17 点赞:0
在 c++而简单加密 中回复
下文5:
if (jp('D'))//向右走
{
turn = 1;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(10);
}
if (ma[nowx + 1][nowy] == 5 && ma[nowx][nowy] != 7)//下面有刺
{
blood--;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
int a = rand() % 2;
Sleep(500);
if (a == 0)
{
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(10);
}
else
{
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(10);
}
printmap();
}
if (blood == 0)
{
ma[nowx][nowy] = 0;
nowx = 7, nowy = 0;
ma[nowx][nowy] = 3;
blood = 100;
printmap();
}
if (ma[nowx + 1][nowy] != 1 && ma[nowx][nowy] != 7 && ma[nowx + 1][nowy] != 5 && ma[nowx + 1][nowy] != 8 && ma[nowx + 1][nowy] != 9)//控制下落
{
print(nowx, nowy, " ");
nowx++;
print(nowx, nowy, "○");
Sleep(50);
}
//system("cls");
//printmap();
Sleep(10);
if (ma[nowx][nowy] == 4)jumphigher = true;
if (ma[nowx][nowy] == 6)blood = min(blood + 1, maxblood), ma[nowx][nowy] = 0, printmap();
if (ma[nowx][nowy] == 2)if (changemap())break;;
}
if (jp('A'))//向左走
{
turn = 0;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(10);
}
if (jp('D'))//向右走
{
turn = 1;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(10);
}
if (ma[nowx + 1][nowy] == 5 && ma[nowx][nowy] != 7)//下面有刺
{
blood--;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
int a = rand() % 2;
Sleep(500);
if (a == 0)
{
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(50);
}
else
{
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(50);
}
printmap();
}
if (blood == 0)
{
ma[nowx][nowy] = 0;
nowx = 7, nowy = 0;
ma[nowx][nowy] = 3;
blood = 3;
printmap();
}
if (ma[nowx + 1][nowy] != 1 && ma[nowx][nowy] != 7 && ma[nowx + 1][nowy] != 5 && ma[nowx + 1][nowy] != 8 && ma[nowx + 1][nowy] != 9)//控制下落
{
print(nowx, nowy, " ");
nowx++;
print(nowx, nowy, "○");
Sleep(10);
}2024-08-24T23:10:30 点赞:0
在 c++而简单加密 中回复
下文6(最后一段了):
Sleep(10);
// system("cls");
// printmap();
if (ma[nowx][nowy] == 4)jumphigher = true;
if (ma[nowx][nowy] == 6)blood = min(blood + 1, maxblood), ma[nowx][nowy] = 0, printmap();
if (ma[nowx][nowy] == 2)if (changemap())break;;
if (jp('A'))//向左走
{
turn = 0;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(10);
}
if (jp('D'))//向右走
{
turn = 1;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(10);
}
if (ma[nowx + 1][nowy] == 5 && ma[nowx][nowy] != 7)//下面有刺
{
blood--;
if (ma[nowx][nowy] == 7)print(nowx, nowy, "▓");
else print(nowx, nowy, " ");
int a = rand() % 2;
Sleep(50);
if (a == 0)
{
nowy--;
if (nowy < 0 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy++;
print(nowx, nowy, "○");
Sleep(50);
}
else
{
nowy++;
if (nowy > 25 || ma[nowx][nowy] == 1 || ma[nowx][nowy] == 5 || ma[nowx][nowy] == 8 || ma[nowx][nowy] == 9)nowy--;
print(nowx, nowy, "○");
Sleep(50);
}
printmap();
}
if (blood == 0)
{
ma[nowx][nowy] = 0;
nowx = 7, nowy = 0;
ma[nowx][nowy] = 3;
blood = 100;
printmap();
}
if (ma[nowx + 1][nowy] != 1 && ma[nowx][nowy] != 7 && ma[nowx + 1][nowy] != 5 && ma[nowx + 1][nowy] != 8 && ma[nowx + 1][nowy] != 9)//控制下落
{
print(nowx, nowy, " ");
nowx++;
print(nowx, nowy, "○");
Sleep(50);
}
Sleep(10);
// system("cls");
// printmap();
if (ma[nowx][nowy] == 4)jumphigher = true;
if (ma[nowx][nowy] == 6)blood = min(blood + 1, maxblood), ma[nowx][nowy] = 0, printmap();
if (ma[nowx][nowy] == 2)if (changemap())break;;
}
// system("cls");
}
}
if (Preserve(red))
{
system("cls");
for (register int i = 1; i <= 11; i++)
printf("%d关 %ds\n", i, rec[i] / 1024);
Button back = NewButton(11, 0, 7, "返回");
while (1)
{
if (Preserve(back))
{
system("cls");
print(0, 0, "move v2.2.1");
print(4, 0, ">开始游戏");
print(6, 0, ">游戏规则");
print(8, 0, ">退出游戏");
print(10, 0, ">查看记录");
break;
}
}
}
}
return 0;
}2024-08-24T23:11:01 点赞:0