开始 2024-08-20 08:00:00

8.19-8.24集训第二天

结束 2024-08-25 00:00:00
Contest is over.
当前 2024-12-22 19:50:20

shuiguo

include<bits/stdc++.h>

include<windows.h>

include<stdio.h>

include<conio.h>

include<time.h>

using namespace std; float X,Y;int Left=1,Right=30,Up=1,Down=20;bool Medal[22],Fr[6],Cheat=0; int Clocknum,T,Score,Combo,FruitNum,Jump_2,SS,FT[11],FC,FCT,FCF,FO,FFFt,FXia,FUp; int up,dn,lf,rt,sy;float Vx,Vy;int Walk,Jump,Rush; int Attention,Jumplock,AttTime,Dnlock,Lflock,Rtlock; int RushT1,RushT2,RushT3;float Rush_Vx,Rush_Vy,Rush_x0,Rush_y0,Rush_X,Rush_Y; const float G=0.038,t0=0.2,t00=0.8,t000=0.3;//时间参量 struct node {int Type;

float X,Y,R,x0,y0,x1,y1;
float Vx,Vy;
int Life,color,brounce,half,Angle,AngleSpeed,t;

}F[100001];int l,m; int N[100][45],M[100][45];

float Sin(int a) {return sin(3.1416a/180);}float Cos(int a) {return cos(3.1416a/180);} void Color(int a){if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); if(a==-10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE);if(a==-11) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_GREEN|BACKGROUND_BLUE);if(a==-12) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_GREEN);if(a==-13) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_BLUE);if(a==-14) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED);if(a==-15) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_GREEN);if(a==-16) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_BLUE);if(a==-17) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE); if(a==-1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE);if(a==-2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_GREEN);if(a==-3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_BLUE);if(a==-4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED);if(a==-5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_GREEN);if(a==-6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_BLUE);if(a==-7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE); } int To_int(float a){return int(a+0.5);}float Abs(float a){return (a>=0)?a:-a;} void Setpos(float x,float y){COORD pos;pos.X=To_int(x)*2+1,pos.Y=To_int(y)+3;SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);} void Put_Frame(){Color(0);int x=Right-Left+1,y=Down-Up+1;for(int i=0;i<=x+1;i++)for(int j=0;j<=y+1;j++){if(i==0||j==0||i==x+1||j==y+1) Setpos(i,j),printf("[]");}} void Clear(float x,float y){ // if(RushT3>0) Color(0);else

Color(-Abs(N[To_int(x)*2][To_int(y)]));Setpos(x,y),printf("  ");
M[To_int(x*2)][To_int(y)]=-1;

}void Medal_(); void Put_Man(float x1,float y1){

int x=To_int(x1);int y=To_int(y1);
if(y<Up||x<Left||x>Right||y>Down) return;
if(Rush==1||AttTime>0||Attention>0) Color(5);
else Color(1);
Setpos(x1,y1),printf("●");

} void Cir(float r,char a){//不要改 ,冲刺动画1

int num=7,Angle=r*10;if(r<=2) num=4;
int next=360/num;
for(int i=Angle;i<360+Angle;i+=next)
{
	float x,y;
	x=X+Cos(i)*r;
	y=Y+Sin(i)*r;
	if(y<Up||x<Left||x>Right||y>Down) continue;
	if(a==' '&&N[To_int(x*2)][To_int(y)]==0&&N[To_int(x*2)+1][To_int(y)]==0&&N[To_int(x*2)-1][To_int(y)]==0) Setpos(x,y),Color(0),printf(" ");
	else if(N[To_int(x*2)][To_int(y)]==0&&N[To_int(x*2)+1][To_int(y)]==0&&N[To_int(x*2)-1][To_int(y)]==0) Setpos(x,y),Color(-14),printf(" ");
}

} void Cir2(int k,float r,char a){//水果整圆

int col=F[k].color;
float x0=F[k].X,y0=F[k].Y,R=F[k].R;
for(int i=y0-R;i<=y0+R;i++){float Ax=sqrt(R*R-(i-y0)*(i-y0));//cout<<i<<' '<<x0-Ax+0.5<<' '<<x0+Ax<<' ';
for(float k=x0-Ax+0.5;k<x0+Ax;k+=0.5)
	if(a==' ') N[To_int(k*2)][i]=0; else N[To_int(k*2)][i]=col;
}
int num=24,Angle=0;if(r<=1) num=4;else if(r<=3) num=12;
int next=360/num;
for(int i=Angle;i<360+Angle;i+=next)
{
	float x,y;
	x=F[k].X+Cos(i)*r;
	y=F[k].Y+Sin(i)*r;
	if(y<Up||x<Left||x>Right||y>Down) continue;
	else {if(a==' ') N[To_int(x*2)][To_int(y)]=0; else N[To_int(x*2)][To_int(y)]=col+10;}
}for(int i=0;i<360;i+=90)
{
	float x,y;
	x=F[k].X+Cos(i)*r;
	y=F[k].Y+Sin(i)*r;
	if(y<Up||x<Left||x>Right||y>Down) continue;
	else {if(a==' ') N[To_int(x*2)][To_int(y)]=0; else N[To_int(x*2)][To_int(y)]=col+10;}
}

} void Cir3(int xx,int yy,float r,char a){//不要改 冲刺动画2

r++;
int num=8,Angle=r*10-17;if(r<=2) num=4;
int next=360/num;
for(int i=Angle;i<360+Angle;i+=next)
{
	float x,y;
	x=xx+Cos(i)*r;
	y=yy+Sin(i)*r;
	if(y<Up||x<Left||x>Right||y>Down) continue;
	if(a==' '&&N[To_int(x*2)][To_int(y)]==0&&N[To_int(x*2)+1][To_int(y)]==0&&N[To_int(x*2)-1][To_int(y)]==0) Setpos(x,y),Color(0),printf(" ");
	else if(N[To_int(x*2)][To_int(y)]==0&&N[To_int(x*2)+1][To_int(y)]==0&&N[To_int(x*2)-1][To_int(y)]==0) Setpos(x,y),Color(-14),printf(" ");
}

} void Cir4(int k,float r,char a){//半圆

int col=F[k].color;
int num=24,Angle=F[k].Angle;if(r<=1) num=4;else if(r<=3) num=12;
int next=360/num;
for(int i=Angle;i<180+Angle;i+=next)
{
	float x,y;
	x=F[k].X+Cos(i)*r;
	y=F[k].Y+Sin(i)*r;
	if(y<Up||x<Left||x>Right||y>Down) continue;
	else {if(a==' ') N[To_int(x*2)][To_int(y)]=0; else N[To_int(x*2)][To_int(y)]=col;}
}bool left=0;
float x0=F[k].X+Cos(Angle)*r    ,y0=F[k].Y+Sin(Angle)*r;
float x1=F[k].X+Cos(Angle+180)*r,y1=F[k].Y+Sin(Angle+180)*r;
float Ax=x1-x0,Ay=y1-y0,Dis=sqrt(Ax*Ax+Ay*Ay);
if(Ay<0) swap(x1,x0),swap(y1,y0),Ax*=-1,Ay*=-1;
if(Ax<0) left=1;
float ax=Ax/Dis*1.0,ay=Ay/Dis*1.0;
float i=x0,j=y0;
while(j<=y1&&((i<=x1&&left==0)||(i>=x1&&left==1))){
	if(j<Up||i<Left||i>Right||j>Down) int nil=0;
	else {if(a==' ') N[To_int(i*2)][To_int(j)]=0; else N[To_int(i*2)][To_int(j)]=col;}
    i+=ax;j+=ay;
}for(int i=0;i<360;i+=90)
{
	if(i<Angle||i>Angle+180) continue; 
	float x,y;
	x=F[k].X+Cos(i)*r;
	y=F[k].Y+Sin(i)*r;
	if(y<Up||x<Left||x>Right||y>Down) continue;
	else  {if(a==' ') N[To_int(x*2)][To_int(y)]=0; else N[To_int(x*2)][To_int(y)]=col;}
}

} void Line(float x0,float y0,float x1,float y1,char a,int col){bool left=0; if(col==-5) m++,F[m].Type=-1,F[m].Life=1,F[m].t=0,F[m].x0=x0,F[m].y0=y0,F[m].x1=x1,F[m].y1=y1;

float Ax=x1-x0,Ay=y1-y0,Dis=sqrt(Ax*Ax+Ay*Ay);
if(Ay<0) swap(x1,x0),swap(y1,y0),Ax*=-1,Ay*=-1;
if(Ax<0) left=1;
float ax=Ax/Dis*0.9,ay=Ay/Dis*0.9;
float i=x0,j=y0;
while(j<=y1&&((i<=x1&&left==0)||(i>=x1&&left==1))){
	if(j<Up||i<Left||i>Right||j>Down) int nil=0;
	else Setpos(i,j),Color(col),printf("  ");
    i+=ax;j+=ay;
}Color(0);

} void Print_Fruit(int i,char a){

if(F[i].half==1) Cir4(i,F[i].R,a);
else Cir2(i,F[i].R,a);

} void Go(){

	if(Y<=Up) Y=Up,AttTime=0;
	if(Y>=Down){FC=0;FCF=0;if(clock()-FCT>10000&&Medal[20]==0&&T>10000) Medal[20]=1,Medal_(); FCT=clock();
		if(Jump>=1) Vy=0,Vx/=2,Y=Down,Jump=0,Walk=1;//触地 
	}
	if(X<=Left) X=Left,Vx=0;if(X>=Right) X=Right,Vx=0;

int Num=up+dn+lf+rt;

if(RushT3>0) RushT3--;
if(RushT2>0){
	if(Rush==2&&RushT2<4) Cir3(Rush_X,Rush_Y,RushT2,' ');
	RushT2--;
	if(RushT2==0) {Rush=0,RushT3=3,Vx=(Vx+Rush_Vx*t00)/3.0,Vy=(Vy+Rush_Vy*t00)/3.0,Line(X,Y,Rush_x0,Rush_y0,' ',-5),Color(0);if(Y<=Up) RushT3=0,AttTime=0,Vy=max(0.1,(double)Vy);FC++;FO++;if(FC>=8&&Medal[16]==0) Medal[16]=1,Medal_();if(FO>=10&&Medal[18]==0) Medal[18]=1,Medal_();}
	if(Rush==2) Cir3(Rush_X,Rush_Y,RushT2,'|');
}
if(AttTime>0){AttTime--;
	if(Num!=0){
		if(up==1&&Jumplock!=0) int nil=0;
		else if(dn==1&&Dnlock!=0) int nil=0;
		else if(Num==1&&lf==1&&Lflock!=0) int nil=0;
		else if(Num==1&&rt==1&&Rtlock!=0) int nil=0;
		else {Attention=0;AttTime=0;
		if(RushT1==0&&Rush==0) RushT1=6;
		}
	}
}
if(RushT1!=0) {
	if(RushT1<6) Cir(RushT1,' ');
	RushT1--;
	if(RushT1==0){//开始冲刺 
		int non=0;//non很重要 
		if(Num==1){
			if(up==1&&Jumplock==0) Rush_Vx=0,Rush_Vy=-1.3,Jumplock=1;
			else if(lf==1&&Lflock==0) Rush_Vx=-1.8,Rush_Vy=0,Lflock=1;
			else if(rt==1&&Rtlock==0) Rush_Vx=1.8,Rush_Vy=0,Rtlock=1;
			else if(dn==1&&Dnlock==0) Rush_Vx=0,Rush_Vy=3,Dnlock=1;
			else non=1;
		}
		else if(Num==2){
			if(up==1&&lf==1&&Jumplock==0) Rush_Vx=-1.5,Rush_Vy=-1.5,Jumplock=1;
			else if(up==1&&rt==1&&Jumplock==0) Rush_Vx=1.5,Rush_Vy=-1.5,Jumplock=1;
			else if(dn==1&&lf==1&&Dnlock==0) Rush_Vx=-1.5,Rush_Vy=1.5,Dnlock=1;
			else if(dn==1&&rt==1&&Dnlock==0) Rush_Vx=1.5,Rush_Vy=1.5,Dnlock=1;
			else non=1;
		}
		else non=1;
		if(non==0) {Rush_x0=X,Rush_y0=Y,Rush=1,RushT2=4;}
	}
	else Cir(RushT1,'|');
}
if(Walk==1&&Jump==0){//正在触地 
	FC=0;FCF=0;if(clock()-FCT>10000&&Medal[20]==0&&T>10000) Medal[20]=1,Medal_(); FCT=clock();
	if(Abs(Vx)<1.95*t0) Attention=0;
	if(Num==0) Vx*=0.6;//摩擦 
	if(Num==1||(Num==2&&up==1)){
		if(lf==1){
			if(Vx<=2*t0&&Vx>-0.8*t0) Vx-=0.5*t0;
			else if(Vx<=-0.8*t0&&Vx>-2*t0) Vx-=0.1*t0;
			else if(Vx<=-2*t0){
				Vx=-2*t0,Attention=1;
				if(up==1) Rush_x0=X,Rush_y0=Y,Rush_X=X-1,Rush_Y=Y-2,Rush=2,RushT2=4,Rush_Vx=-1.5,Rush_Vy=-1.5,Jumplock=1; 
			}
		}
		if(rt==1){
			if(Vx<=0.8*t0&&Vx>-2*t0) Vx+=0.5*t0;
			else if(Vx>=0.8*t0&&Vx<2*t0) Vx+=0.1*t0;
			else if(Vx>=2*t0){
				Vx=2*t0,Attention=1;
				if(up==1) Rush_x0=X,Rush_y0=Y,Rush_X=X+1,Rush_Y=Y-2,Rush=2,RushT2=4,Rush_Vx=1.5,Rush_Vy=-1.5,Jumplock=1;
			}
		}
		if(up==1){
			Vy=-0.6;Walk=0;Jump=1;Jumplock=1;
		}
	}
}
if(Jump>=1&&Rush==0){//普通滞空 
int num=up+dn;
	if(Abs(Vy)<=0.05) Attention=1,AttTime=7;else Attention=0;
	if(num==1&&up==1&&Jump==1&&Attention==0&&AttTime==0&&Jumplock==0&&Jump_2==1){
		if(Vy>-0.2) Vy=-0.4;
		if(Vy<=-0.2) Vy-=0.2;
		Jump=2;//二段跳 
	}
	if(num==1&&dn==1){
		Vy+=0.1; 
	}
	Vy+=G;
}
Clear(X,Y);
if(RushT1>0) int nil=0;
else if(Rush==1) X+=Rush_Vx*t00,Y+=Rush_Vy*t00;
else X+=Vx,Y+=Vy;

if(Y<Up||X<Left||X>Right||Y>Down){
	if(Rush>0||RushT3>0)
	{
		if((X<Left||X>Right)&&Rush_Vy==0) Vy=-0.2,Vx=0;
	}
}
if(Y<=Up) Y=Up;if(X<=Left) X=Left;if(X>=Right) X=Right;if(Y>=Down) Y=Down;
Put_Man(X,Y);

} void CreatF(){ if(clock()-Clocknum>=25) return; if(FruitNum>=5) return;

m++;F[m].Life=2;F[m].brounce=1;F[m].half=0;F[m].t=0; 
int R=rand()%5+1;F[m].Type=R;
if(R==1) F[m].R=3.45,F[m].color=2;//="Watermelon";
if(R==2) F[m].R=1.85,F[m].color=4;//="Strawberry";
if(R==3) F[m].R=2.0,F[m].color=5;//="Orange    ";
if(R==4) F[m].R=2.45,F[m].color=3;//="Grapes    ";
if(R==5) F[m].R=1.85,F[m].color=6;//="Blueberry ";
int r=rand()%6+1;
if(r<=6) {//上下方 
	F[m].X=Left+(rand()%100)*(Right-Left)/100.0;
	F[m].Vx=1.0-(rand()%100)*2/100.0;
	if(r>1) F[m].Y=Down-1,F[m].Vy=-1-(rand()%100)*1/100.0;
	else F[m].Y=Up+1,F[m].Vy=(rand()%100)*1/100.0;
	F[m].Angle=rand()%360,F[m].AngleSpeed=rand()%20+5;
	if(r>1) F[m].Y+=F[m].R;else F[m].Y-=F[m].R;
}

} void Move(int Stage){//移动的状态调整,准备移步至Go函数

float x,y,r;FruitNum=0;
for(int i=l;i<=m;i++){
	
	if(i==l&&F[i].Life==0){l++;if(l>m) l=1,m=0;continue;}
	else if(F[i].Life==0) {continue;}
	if(F[i].Type==-1){F[i].t++;
		if(F[i].t==3) Line(F[i].x0+Rush_Vx,F[i].y0+Rush_Vy,F[i].x1+Rush_Vx,F[i].y1+Rush_Vy,' ',-1);
		if(F[i].t>=4) Line(F[i].x0,F[i].y0,F[i].x1,F[i].y1,' ',0),Line(F[i].x0+Rush_Vx,F[i].y0+Rush_Vy,F[i].x1+Rush_Vx,F[i].y1+Rush_Vy,' ',0),F[i].Life=0;
	continue;}
	if(F[i].Life==2){F[i].t++;
		if(F[i].t>10) {Color(0);x=F[i].X,y=(F[i].Y>=Down)?Down:Up;
		 		M[To_int(x*2)][To_int(y)]=-1;
			F[i].Life=1;}
		else  Color((F[i].t%6<=2)?-4:-5),Setpos(F[i].X,(F[i].Y>=Down)?Down:Up),cout<<"!!";
		Color(0);
		continue;
	}
	Print_Fruit(i,' ');
	if(F[i].half==1) F[i].R*=0.96;
	if(F[i].half==1&&F[i].t>=20){F[i].Life=0;continue;}
	if(F[i].Type>=1&&F[i].Type<=5) FruitNum++;
	
	x=F[i].X,y=F[i].Y,r=F[i].R;
	float D=sqrt((x-X)*(x-X)+(y-Y)*(y-Y)),D2=sqrt((Rush_x0-x)*(Rush_x0-x)+(Rush_y0-y)*(Rush_y0-y));
	if((D<=r*1.0||D2<=r*1.0)&&(Rush!=0||RushT3!=0)&&F[i].half==0) {
	Combo++,Score+=10*Combo;FO=0;
	if(Medal[8]==0&&Rush_Vx==0&&Rush_Vy>0) FXia++;if(FXia>=30) Medal[8]=1,Medal_(); if(Medal[14]==0&&Rush_Vx==0&&Rush_Vy<0) FUp++;if(FUp>=40) Medal[14]=1,Medal_(); 
	if(Medal[3]==0) Medal[3]=1,Medal_();if(Fr[F[i].Type]==0) {Fr[F[i].Type]=1;if(Fr[1]+Fr[2]+Fr[3]+Fr[4]+Fr[5]==5) Medal[4]=1,Medal_();}if(Combo>=15&&Medal[5]==0) Medal[5]=1,Medal_();if(Combo>=40&&Medal[17]==0) Medal[17]=1,Medal_();if(Score==520&&Medal[6]==0) Medal[6]=1,Medal_();
	if(Score>=1000&&Medal[15]==0) Medal[15]=1,Medal_();if(Score>=10000&&Medal[19]==0) Medal[19]=1,Medal_();if(Score>=100000&&Medal[21]==0) Medal[21]=1,Medal_();
	FCF++;if(FCF>=5&&Medal[9]==0) Medal[9]=1,Medal_();if(FCF>=10&&Medal[12]==0) Medal[12]=1,Medal_();
		if(F[i].Y<=Up&&Medal[13]==0) Medal[13]=1,Medal_(); if(F[i].Y>=Down&&Medal[7]==0) Medal[7]=1,Medal_();if(Medal[10]==0) {FFFt++;if(FFFt>10) FFFt-=10;FT[FFFt]=clock();int Kkk=5000;for(int kk=1;kk<=10;kk++) Kkk=max(Kkk,(int)(clock()-FT[kk]));if(Kkk<5000) Medal[10]=1,Medal_();} 
		
		F[i].Life=0;
		for(int tt=1;tt<=3;tt++){
		if(tt==1) for(int t=1;t<=2;t++) m++,F[m].R=F[i].R-0.6+(rand()%10+10)/20.0,F[m].Life=1,F[m].Type=6,F[m].color=4,F[m].brounce=0,F[m].half=1,F[m].X=F[i].X,F[m].Y=F[i].Y,F[m].t=0;
		if(tt==2) for(int t=1;t<=2;t++) m++,F[m].R=F[i].R-0.6+(rand()%10+10)/20.0,F[m].Life=1,F[m].Type=6,F[m].color=F[i].color,F[m].brounce=0,F[m].half=1,F[m].X=F[i].X,F[m].Y=F[i].Y,F[m].t=0;
		if(tt==3) for(int t=1;t<=2;t++) m++,F[m].R=F[i].R-0.4,F[m].Life=1,F[m].Type=F[i].Type,F[m].color=F[i].color+10,F[m].brounce=0,F[m].half=1,F[m].X=F[i].X,F[m].Y=F[i].Y,F[m].t=0;
		if(Rush_Vx!=0&&Rush_Vy==0){//横切 
			int turn=(Rush_Vx>0)?1:-1;
			F[m-1].Angle=180,F[m-1].AngleSpeed=turn*(5+rand()%10),F[m-1].Vx=F[i].Vx+turn*(rand()%10+10)*0.1,F[m-1].Vy=F[i].Vy-(rand()%10+10)*0.05-1;//上 
			F[m].Angle=0,F[m].AngleSpeed=turn*(-5-rand()%10),F[m].Vx = F[i].Vx+turn*(rand()%10+10)*0.1,F[m].Vy = F[i].Vy+(rand()%10+10)*0.05;//下 
		}else if(Rush_Vy!=0&&Rush_Vx==0){//竖切 
			int turn=(Rush_Vy>0)?1:-1;
			F[m-1].Angle=270,F[m-1].AngleSpeed=turn*(5+rand()%10),F[m-1].Vx=F[i].Vx+(rand()%10+10)*0.1,F[m-1].Vy=F[i].Vy+(rand()%10+10)*0.1*turn-0.5;//→ 
			F[m].Angle=90,F[m].AngleSpeed=turn*(-5-rand()%10),F[m].Vx = F[i].Vx-(rand()%10+10)*0.1,F[m].Vy = F[i].Vy+(rand()%10+10)*0.1*turn-0.5;//左 
		}else{
			if(Rush_Vy*Rush_Vx<0){int turn=(Rush_X<0)?1:-1; //右上 
				F[m-1].Angle=135,F[m-1].AngleSpeed=-turn*(5+rand()%10),F[m-1].Vx=F[i].Vx-(rand()%10+10)*0.1,F[m-1].Vy=F[i].Vy-(rand()%10+10)*0.04-1;//上 
				F[m].Angle=315,F[m].AngleSpeed=turn*(5+rand()%10),F[m].Vx=F[i].Vx+(rand()%10+10)*0.1,F[m].Vy=F[i].Vy+(rand()%10+10)*0.04;//下 
			} 
			if(Rush_Vy*Rush_Vx>0){int turn=(Rush_X<0)?1:-1;//左上 
				F[m-1].Angle=225,F[m-1].AngleSpeed=-turn*(5+rand()%10),F[m-1].Vx=F[i].Vx+(rand()%10+10)*0.1,F[m-1].Vy=F[i].Vy-(rand()%10+10)*0.04-1;//上 
				F[m].Angle=45,F[m].AngleSpeed=turn*(5+rand()%10),F[m].Vx=F[i].Vx-(rand()%10+10)*0.1,F[m].Vy=F[i].Vy+(rand()%10+10)*0.04;//下 
			}
		}if(tt<=1) F[m-1].Vx*=1.2,F[m-1].Vy*=1.2,F[m].Vx*=1.2,F[m].Vy*=1.2;
		}
		continue;
	}
	F[i].t++;
	F[i].Angle+=F[i].AngleSpeed;
	if(F[i].Angle>=360) F[i].Angle-=360;
	if(F[i].Angle<0) F[i].Angle+=360;
	
	F[i].X+=F[i].Vx*t000;F[i].Y+=F[i].Vy*t000;
	x=F[i].X,y=F[i].Y;
	
	if(y+F[i].R<Up||y-F[i].R>Down){
		if(F[i].t<=5) {F[i].Vy*=-1;
		if(y+F[i].R<Up) F[i].Y=-F[i].R+Up;
		if(y-F[i].R>Down) F[i].Y=F[i].R+Down;}
	
	F[i].Life=0;continue;}
	if(x<Left||x>Right){
		if(F[i].brounce>0||F[i].t<=5){if(F[i].brounce>0) F[i].brounce--;F[i].Vx*=-1;
			if(x<Left) F[i].X=Left;
			if(x>Right) F[i].X=Right;
		}
		else {F[i].Life=0;continue;}
	}
	if(Stage==0||F[i].Type<=0||F[i].Type>=5) F[i].Vy+=G;
	
	Print_Fruit(i,'*');
}

} void Print(){

for(int i=Left*2;i<=Right*2;i++)
for(int j=Up;j<=Down;j++){
	if(N[i][j]!=M[i][j]){
		if(N[i][j]==0) Color(0),Setpos(i/2.0,j),printf("  ");
		else Color(-Abs(N[i][j])),Setpos(i/2.0,j),printf("  ");
	}
	M[i][j]=N[i][j];
}memset(N,0,sizeof(N));Color(0);

} void Slow(char p) {while(1){if(p!=0) printf("%c",*p++);else break;if(!kbhit()) Sleep(20);}} int speed; void Start(){Color(1);SS=1;

Setpos(2,2),cout<<"水果忍胎 0.9 ";
Setpos(10,3),cout<<"作者:****";
Setpos(2,6),cout<<"按 x 进入教学模式,按 y 直接开始游戏!";
Setpos(2,8),cout<<"除了封面其他的都做好了qwq,但是做封面好麻烦所以说不想做直接发布了   我这边用的 Win11 输出的字符画很流畅,不知道你们电脑会不会有什么黑点阿残影阿输出错误之类的,总之这个游戏玩起来确实蛮爽的!大家加油,看看哪个先点满成就哈(万一有 BUG 呢是吧,毕竟有些成就死活打不出来...另外因为有成就所以说顺便把存档也做了,大家放心打)";
Setpos(1,20),cout<<"你可根据电脑性能重新选择画面流畅度:默认为 均衡 流畅度,按 q 调为低流畅,按 w 调为中低流畅,按 e 调为极高流畅 (盲目调高流畅度会导致画面卡顿)";speed=4;
A:char e=_getch();if(e=='y') return;else if(e=='x') int nil=0;else if(e=='q') {speed=10;goto A;}else if(e=='w') {speed=4;goto A;}else if (e=='e') {speed=2;goto A;}else goto A;
int Stage=0,StageY=0,StageT=0;
system("cls");memset(N,0,sizeof(N));memset(M,0,sizeof(M));
Put_Frame();
T=0;Clocknum=0;X=2;Y=1;Vx=Vy=0;Jump=1;Put_Man(X,Y);//初始状态掉落 
memset(F,0,sizeof(F));l=m=0;Score=Combo=0;
while(1) if(clock()-Clocknum>=25)
{T++;
	Clocknum=clock();
	up=dn=lf=rt=0;
    if(GetAsyncKeyState(VK_UP)&0x8000) up=1;else Jumplock=0; 
    if(GetAsyncKeyState(VK_DOWN)&0x8000) dn=1;else Dnlock=0; 
    if(GetAsyncKeyState(VK_LEFT)&0x8000) lf=1;else Lflock=0; 
    if(GetAsyncKeyState(VK_RIGHT)&0x8000) rt=1;else Rtlock=0; 
    if(kbhit()) {char g=_getch();if(g==' ') Sleep(100),Setpos(16,3),sy++,Color(0),system("pause");if(g=='y'&&Stage>=1) StageY=1;if(g=='x'&&Stage==2) Jump_2=1,Setpos(26,26),Color(5),cout<<"开";}
    if(sy>=1) Setpos(16,3),cout<<"                           ",sy=0;
    
    if(Stage==0&&StageT==0){
    	Setpos(2,22),Color(0),Slow("欢迎来到 忍者神胎 教学关卡");Sleep(500);
    	Setpos(2,24),Color(0),Slow("本游戏只有↑↓→←四种按键操作,想必是十分简单的,但又有很大的发挥空间!");Sleep(500);
    	Setpos(2,26),Color(0),Slow("按下↑↓→←进行移动。注:空中按 ↓ 有加速下落的效果");
		StageT=T;	
	}
	if(Stage==0&&T-StageT>=100)//5s
	{Stage++;
    	Setpos(2,22),Color(0),printf("                           ");
    	Setpos(2,24),Color(0),printf("                                                                        ");	
    	Setpos(2,26),Color(0),printf("                                                                ");
    	m++,F[m].Angle=0,F[m].AngleSpeed=0,F[m].color=2,F[m].half=0,F[m].Life=1,F[m].R=3.45,F[m].t=0,F[m].Type=1,F[m].Vx=F[m].Vy=0,F[m].X=16,F[m].Y=13;Print();
    	Setpos(2,22),Color(0),Slow("按↑跳起后,立刻在空中重新  长按 方向键 可以进行挥砍!来试试刀法!");
    	Setpos(2,24),Color(0),Slow("按 y 开启下一阶段教学");
	}
	if(Stage==1&&F[1].Life==1) StageT=T;
	if(Stage==1&&F[1].Life==0&&T-StageT>=20){
		StageT=T;
    	l=0,m++,F[1].Angle=45,F[1].AngleSpeed=0,F[1].color=2,F[1].half=0,F[1].Life=1,F[1].R=3.45,F[1].t=0,F[1].Type=1,F[1].Vx=F[1].Vy=0,F[1].X=16,F[1].Y=13;
	}
    if(StageY==1&&Stage==1){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
    	Setpos(2,22),Color(0);printf("                                                               ");
    	Setpos(2,24),Color(0);printf("                      "); 
    	l=0;for(int tt=1;tt<=3;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0,F[tt].X=16,F[tt].Y=19-tt*5;
    	Print();Setpos(2,22),Color(0),Slow("接下来练习连招!");
    	Setpos(2,24),Color(0),Slow("在空中可以连续按  ↑ 进行多段跳跃,如果你不习惯,可以按 x 开启二段跳能力(PS:连招的秘诀是把握节奏)");
    	Setpos(2,26),Color(0),Slow("按 y 开启下一阶段教学      ( 二段跳能力状态:       )");
    	Setpos(26,26),Color(5);cout<<"关";
	}
	if(Stage==2&&F[1].Life+F[2].Life+F[3].Life==3) StageT=T;
	if(Stage==2&&F[1].Life+F[2].Life+F[3].Life<3&&T-StageT>=50){
		StageT=T;
    	l=0;for(int tt=1;tt<=3;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0,F[tt].X=16,F[tt].Y=19-tt*5;
    }
    if(StageY==1&&Stage==2){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
    	Setpos(2,22),Color(0),printf("                 ");
    	Setpos(2,24),Color(0),printf("                                                                                                  ");
    	Setpos(2,26),Color(0),printf("                                                          ");
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
		F[1].X=9,F[1].Y=15.5;F[2].X=17.3,F[2].Y=9.4;F[3].X=9.6,F[3].Y=3.5;F[4].X=17,F[4].Y=1;

    	Print();Setpos(2,22),Color(0);Slow("空中折线跳:先跳起,再在空中向上连续左右冲刺,是一种杀伤面积广,上升距离大的连招");
    	Setpos(2,24),Color(0);Slow("按 y 开启下一阶段教学 (本关四个果子可一个连招砍完,试试精细操作!)"); 
	}
	if(Stage==3&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
	if(Stage==3&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
		StageT=T;
    
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
		F[1].X=9,F[1].Y=15.5;F[2].X=17.3,F[2].Y=9.4;F[3].X=9.6,F[3].Y=3.5;F[4].X=17,F[4].Y=1;}
    if(StageY==1&&Stage==3){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
    	Setpos(2,22),Color(0),printf("                                                                                         ");
    	Setpos(2,24),Color(0),printf("                                                                            ");
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
		F[1].X=15.4,F[1].Y=15.5;F[2].X=7.3,F[2].Y=9.5;F[3].X=15.4,F[3].Y=3.6;F[4].X=15.4,F[4].Y=8.5;

    	Print();Setpos(2,22),Color(0);Slow("三角围杀:先使用折线跳跳至目标上方,再向下瞄准,冲刺切除下方水果");
    	Setpos(2,24),Color(0);Slow("按 y 开启下一阶段教学"); 
	}
	if(Stage==4&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
	if(Stage==4&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
		StageT=T;
    
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
		F[1].X=15.4,F[1].Y=15.5;F[2].X=7.3,F[2].Y=9.5;F[3].X=15.4,F[3].Y=3.6;F[4].X=15.4,F[4].Y=8.5;}
    if(StageY==1&&Stage==4){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
    	Setpos(2,22),Color(0),printf("                                                                              ");
    	Setpos(2,24),Color(0),printf("                                                                            ");
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
		F[1].X=4.7,F[1].Y=15.5;F[2].X=1,F[2].Y=15.5;F[3].X=1,F[3].Y=11;F[4].X=10,F[4].Y=5;

    	Print();Setpos(2,22),Color(0);Slow("撞墙跳:利用平扑撞墙会产生一个小向上速度的特性,将本应断掉的连招接续起来");
    	Setpos(2,24),Color(0);Slow("按 y 开启下一阶段教学 (本关接连招砍绿果、紫果、红果)"); 
	}
	if(Stage==5&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
	if(Stage==5&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
		StageT=T;
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    	F[1].X=4.7,F[1].Y=15.5;F[2].X=1,F[2].Y=15.5;F[3].X=1,F[3].Y=11;F[4].X=10,F[4].Y=5;}
    if(StageY==1&&Stage==5){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
    	Setpos(2,22),Color(0),printf("                                                                                ");
    	Setpos(2,24),Color(0),printf("                                                                            ");
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
		F[1].X=18,F[1].Y=15;F[2].X=16,F[2].Y=17;F[3].X=24,F[3].Y=13;F[4].X=24,F[4].Y=8;

    	Print();Setpos(2,22),Color(0);Slow("平地起冲:长按 → 加速至变黄,立即再按下  ↑ 可直接起冲,接连招");
    	Setpos(2,24),Color(0);Slow("按 y 开启下一阶段教学 (本关接连招砍紫果、红果)"); 
	}
	if(Stage==6&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
	if(Stage==6&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
		StageT=T;
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    	F[1].X=18,F[1].Y=15;F[2].X=16,F[2].Y=17;F[3].X=24,F[3].Y=13;F[4].X=24,F[4].Y=8;}
    if(StageY==1&&Stage==6){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
    	Setpos(2,22),Color(0),printf("                                                                              ");
    	Setpos(2,24),Color(0),printf("                                                                            ");
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
		F[1].X=5,F[1].Y=16;F[2].X=10,F[2].Y=19;F[3].X=12,F[3].Y=19;F[4].X=21,F[4].Y=15;

    	Print();Setpos(2,22),Color(0);Slow("凌波微步: 跳起在空中向右下冲击地面,不要松开 →以获得极大的速度,然后重新按下  ↑ ,紧接平地起冲!");
    	Setpos(2,24),Color(0);Slow("按 y 完成教学关卡 (本关蓝果下冲,紫果起跳,接连招砍红果)"); 
	}
	if(Stage==7&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
	if(Stage==7&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
		StageT=T;
    	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
		F[1].X=5,F[1].Y=16;F[2].X=10,F[2].Y=19;F[3].X=12,F[3].Y=19;F[4].X=21,F[4].Y=15;
    }
    if(StageY==1&&Stage==7) return;
    
	if(RushT1==0) Move(1);
    Go();
	if(RushT1==0&&T%speed==0) Print();

} } void Read(){

ifstream in("水果忍胎存档.in");int Xx=0,Yy;
for(int i=0;i<=21;i++) in>>Medal[i],Xx+=345*(2*i+1)*Medal[i];
in>>Yy>>Score>>Combo>>T>>FXia>>FUp;if(Yy!=Xx) Cheat=1;
in.close();

} void Save(){

ofstream out("水果忍胎存档.in");int Xx=0;
for(int i=0;i<=21;i++) out<<Medal[i]<<' ',Xx+=345*(2*i+1)*Medal[i];
out<<Xx<<' '<<Score<<' '<<Combo<<' '<<T<<' '<<FXia<<' '<<FUp;
out.close();

} void Medal_(){if(SS==1) return;

if(Cheat==1) Setpos(33,0),Color(4),printf("检测到您更改过存档,你的存档已不可用。"),memset(Medal,0,sizeof(Medal));
Setpos(33,1),Color(0),printf("[成就系统]  (按 c 可以存档 d 读档)");int rr=0;
Setpos(34,3);if(Medal[3]==1) Color(5),rr++;else Color(7);printf("[出刀!]   完成一次切割");
Setpos(34,4);if(Medal[7]==1) Color(5),rr++;else Color(7);printf("[绝杀]     在底线处完成一次切割");
Setpos(34,5);if(Medal[4]==1) Color(5),rr++;else Color(7);printf("[全图鉴]   切割全部五种水果");
Setpos(34,6);if(Medal[5]==1) Color(5),rr++;else Color(7);printf("[闪光]     达到十五 COMBO");   
Setpos(34,7);if(Medal[6]==1) Color(5),rr++;else Color(7);printf("[回眸]     精准达到 520 分");  
Setpos(34,8);if(Medal[8]==1) Color(5),rr++;else Color(7);printf("[柴刀]     下劈劈裂水果三十次");
Setpos(34,9);if(Medal[9]==1) Color(5),rr++;else Color(7);printf("[连锁反应] 一次腾空中切割五个水果");
Setpos(34,10);if(Medal[10]==1) Color(5),rr++;else Color(7);printf("[霹雳]     五秒钟切割十个水果");
Setpos(34,11);if(Medal[11]==1) Color(5),rr++;else Color(7);printf("[征服者]   进行五分钟游戏");
Setpos(34,12);if(Medal[12]==1) Color(5),rr++;else Color(7);printf("[神来之笔] 一次腾空中切割十个水果");
Setpos(34,13);if(Medal[13]==1) Color(5),rr++;else Color(7);printf("[天封]     在最高线处完成一次切割");
Setpos(34,14);if(Medal[14]==1) Color(5),rr++;else Color(7);printf("[升龙]     上劈劈裂水果四十次");
Setpos(34,15);if(Medal[15]==1) Color(5),rr++;else Color(7);printf("[小忍者]   达到一千分");
Setpos(34,16);if(Medal[16]==1) Color(5),rr++;else Color(7);printf("[八连]     一次腾空中冲刺八次(有巧解)");   
Setpos(34,17);if(Medal[17]==1) Color(5),rr++;else Color(7);printf("[连诀]     达到四十 COMBO");   
Setpos(34,18);if(Medal[18]==1) Color(5),rr++;else Color(7);printf("[幸存者]   连续十次空刀(请勿点亮)");    
Setpos(34,19);if(Medal[19]==1) Color(5),rr++;else Color(7);printf("[水果杀手] 达到一万分");
Setpos(34,20);if(Medal[20]==1) Color(5),rr++;else Color(7);printf("[虎翅]     腾空十秒");   
Setpos(34,21);if(Medal[21]==1) Color(5),rr++;else Color(7);printf("[你疯了?!] 达到十万分");
Setpos(34,22);if(rr>=19) Medal[22]=1;if(Medal[22]==1) Color((T%4<=1)?-4:-5);else Color(7);printf("[传说]     达成全部成就");   

} int main(){

CONSOLE_CURSOR_INFO cursor_info={1,0};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);
srand((unsigned)time(NULL));
Start();
ST:SS=0;
system("cls");memset(N,0,sizeof(N));memset(M,0,sizeof(M));FC=FCF=FCT=FO=FFFt=FXia=FUp=0;memset(FT,0,sizeof(FT));memset(Medal,0,sizeof(Medal));
Put_Frame();Medal_();
T=0;Clocknum=0;X=2;Y=1;Vx=Vy=0;Jump=1;Put_Man(X,Y);//初始状态掉落 
memset(F,0,sizeof(F));l=m=0;Score=Combo=0;
Setpos(2,-3),Color(1),cout<<"本游戏为休闲模式,没有目标分数,请尽情享受切水果的酣爽盛宴!(空格可以暂停)";Medal_();
while(1) if(clock()-Clocknum>=25)
{T++;if(T>11000&&Medal[11]==0) Medal[11]=1,Medal_();
	Clocknum=clock();
	up=dn=lf=rt=0;
    if(GetAsyncKeyState(VK_UP)&0x8000) up=1;else Jumplock=0; 
    if(GetAsyncKeyState(VK_DOWN)&0x8000) dn=1;else Dnlock=0; 
    if(GetAsyncKeyState(VK_LEFT)&0x8000) lf=1;else Lflock=0; 
    if(GetAsyncKeyState(VK_RIGHT)&0x8000) rt=1;else Rtlock=0; 
    if(kbhit()) {char g=_getch();if(g==' ') Sleep(100),Setpos(16,3),sy++,Color(0),system("pause");if(g=='c') Save(),system("color 6E"),Sleep(1000),system("color 0F");if(g=='d') Read(),system("color 6E"),Sleep(1000),system("color 0F"),Medal_();}
    if(sy>=1) Setpos(16,3),cout<<"                           ",sy=0;
    
	if(RushT1==0) Move(0);
    Go();
	if(RushT1==0&&T%speed==0) Print();
    
    if(clock()-Clocknum>=25) continue;
    if(T>=50&&T<=200&&T%15==5) CreatF();
	if(T>=300&&T<2000&&T%80==5) CreatF();
	else if(T>=2000&&T<3000&&T%70==5) CreatF();
	else if(T>=3000&&T<4000&&T%50==5) CreatF();
	else if(T>=4000&&T%30==5) CreatF();
	if(T>=1500&&T%80==5) CreatF();
	if(Combo>=10&&T%80==40) CreatF();
if((Combo<10&&T%140==0)||(Combo>=10&&Combo<20&&T%100==0)||(Combo>=20&&T%70==0)) Combo--;Combo=max(0,Combo);
if(Rush==1||AttTime>0||Attention==1) Color(5);else Color(1);Setpos(2,-2),printf("积分:%-4d ",Score);
if(Combo>=15) Color((T%4<=1)?-4:-5); printf("  连击 %-3dCOMBO !!  ",Combo);
if(Rush==1||AttTime>0||Attention==1) Color(5);else Color(1);printf(" 用时:%d ",T);Color(0);
}
return 0;

}


tanhaoran123  •  4个月前

ค้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้


maianyan  •  4个月前

比赛已结束。