修练者
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int input1,rk,sk=0;
int card[9],cardx;
string grade[9]={""," \\ A / "," \\ A / "," \\ A / "," \\ S / "," \\ A / "," \\ A / "," \\ S / "," \\SSR/ "},people[9]={"","羊大婶","菲菲","沐沐","BUG狼","小程","小呆","布丁","酷丁猫"},input;
int main(){
::MessageBox(NULL, TEXT(" 请调为全屏, 否则可能会有贴图bug!\n 别问为什么, 说多了都是泪(doge)"), TEXT("温馨提示"), 0);
while(true){
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n 酷丁名人堂 ";
cout<<"\n □×"<<sk<<endl;
cout<<"─────────────────────────────────────────────\n";
cout<<"╭───────╮ ╭───────╮ ╭───────╮ ╭───────╮ \n";
for(int i=1;i<=4;i++)
if(card[i])
cout<<"│"<<grade[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n";
cout<<"│ │ │ │ │ │ │ │ \n";
for(int i=1;i<=4;i++)
if(card[i]-1==1)
cout<<"│★ │ ";
else if(card[i]-1==2)
cout<<"│★★ │ ";
else if(card[i]-1==3)
cout<<"│★★★ │ ";
else if(card[i]-1==4)
cout<<"│★★★★ │ ";
else if(card[i]-1>=5)
cout<<"│★★★★★ │ ";
else
cout<<"│ │ ";
cout<<"\n";
for(int i=1;i<=4;i++)
if(card[i])
cout<<"│"<<std::left<<setw(7)<<people[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n╰───────╯ ╰───────╯ ╰───────╯ ╰───────╯ \n";
cout<<"╭───────╮ ╭───────╮ ╭───────╮ ╭───────╮ \n";
for(int i=5;i<=8;i++)
if(card[i]>0&&card[i]<6)
cout<<"│"<<grade[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n";
cout<<"│ │ │ │ │ │ │ │ \n";
for(int i=5;i<=8;i++)
if(card[i]-1==1)
cout<<"│★ │ ";
else if(card[i]-1==2)
cout<<"│★★ │ ";
else if(card[i]-1==3)
cout<<"│★★★ │ ";
else if(card[i]-1==4)
cout<<"│★★★★ │ ";
else if(card[i]-1>=5)
cout<<"│★★★★★ │ ";
else
cout<<"│ │ ";
cout<<"\n";
for(int i=5;i<=8;i++)
if(card[i])
cout<<"│"<<std::left<<setw(7)<<people[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n╰───────╯ ╰───────╯ ╰───────╯ ╰───────╯ \n";
cout<<"你现在要干什么\n1.上课(可获得随机名片) 2.抽卡 3.退出\n";
cin>>input;
if(input=="1"){
int ck=rand()%7+-2;
if(sk-ck<0)
ck=rand()%5+1;
sk+=ck;
if(ck>0){
cout<<"你上表现较好, 老师奖励了你";
cout<<ck<<"个名片\n";
}
else if(ck<0){
cout<<"你上课表现较差, 老师扣了你";
cout<<abs(ck)<<"个名片\n";
}
else
cout<<"你上课啥都没干\n";
Sleep(500);
system("pause");
}
else if(input=="2"){
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
cout<<"╭────╭────╭────╭────╭────╭────╭────╭───────╮\n";
for(int i=1;i<=4;i++)
cout<<"│ │ │ │ │ │ │ │ │\n";
cout<<"╰────╰────╰────╰────╰────╰────╰────╰───────╯\n";
cout<<"\n\n\n\n\n\n\n\n";
cout<<"输入卡牌序号, 表示你所抽的卡牌\n";
cout<<"范围: 1~8\n";
cout<<" □×6 抽取\n";
cin>>input1;
rk=rand()%8+1;
if(input1<1 || input1>8)
cout<<" 无法抽取, 没有这张卡\n";
else if(sk>=6 && card[rk]==0){
cout<<"你抽到了卡牌 "<<people[rk]<<" \n";
card[rk]++;
sk-=6;
}
else if(sk>=6 && card[rk]>0){
cout<<"你的卡牌 "<<people[rk]<<" 加了一颗星\n";
card[rk]++;
sk-=6;
}
else
cout<<" 无法抽取, 名片不足\n";
Sleep(500);
system("pause");
}
else if(input=="3")
return 0;
}
return 0;
}
周少平在2024-11-02 15:50:59追加了内容
对了问答怎么改头像
高级光能
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int input1,rk,sk=0;
int card[9],cardx;
string grade[9]={""," \\ A / "," \\ A / "," \\ A / "," \\ S / "," \\ A / "," \\ A / "," \\ S / "," \\SSR/ "},people[9]={"","羊大婶","菲菲","沐沐","BUG狼","小程","小呆","布丁","酷丁猫"},input;
string rizhi[10005];
int rzcnt;
string tostr(int x){
stringstream ss;
ss<<x;
string ans;
ss>>ans;
return ans;
}
int main(){
::MessageBox(NULL, TEXT(" 请调为全屏, 否则可能会有贴图bug!\n 别问为什么, 说多了都是泪(doge)"), TEXT("温馨提示"), 0);
while(true){
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n 酷丁名人堂 ";
cout<<"\n □×"<<sk<<endl;
cout<<"─────────────────────────────────────────────\n";
cout<<"╭───────╮ ╭───────╮ ╭───────╮ ╭───────╮ \n";
for(int i=1;i<=4;i++)
if(card[i])
cout<<"│"<<grade[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n";
cout<<"│ │ │ │ │ │ │ │ \n";
for(int i=1;i<=4;i++)
if(card[i]-1==1)
cout<<"│★ │ ";
else if(card[i]-1==2)
cout<<"│★★ │ ";
else if(card[i]-1==3)
cout<<"│★★★ │ ";
else if(card[i]-1==4)
cout<<"│★★★★ │ ";
else if(card[i]-1>=5)
cout<<"│★★★★★ │ ";
else
cout<<"│ │ ";
cout<<"\n";
for(int i=1;i<=4;i++)
if(card[i])
cout<<"│"<<std::left<<setw(7)<<people[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n╰───────╯ ╰───────╯ ╰───────╯ ╰───────╯ \n";
cout<<"╭───────╮ ╭───────╮ ╭───────╮ ╭───────╮ \n";
for(int i=5;i<=8;i++)
if(card[i]>0&&card[i]<6)
cout<<"│"<<grade[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n";
cout<<"│ │ │ │ │ │ │ │ \n";
for(int i=5;i<=8;i++)
if(card[i]-1==1)
cout<<"│★ │ ";
else if(card[i]-1==2)
cout<<"│★★ │ ";
else if(card[i]-1==3)
cout<<"│★★★ │ ";
else if(card[i]-1==4)
cout<<"│★★★★ │ ";
else if(card[i]-1>=5)
cout<<"│★★★★★ │ ";
else
cout<<"│ │ ";
cout<<"\n";
for(int i=5;i<=8;i++)
if(card[i])
cout<<"│"<<std::left<<setw(7)<<people[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n╰───────╯ ╰───────╯ ╰───────╯ ╰───────╯ \n";
cout<<"你现在要干什么\n1.上课(可获得随机名片) 2.抽卡 3.退出 4.日志(最多保存10000条,於海洋开发)\n";
cin>>input;
if(input=="1"){
int ck=rand()%7+-2;
if(sk-ck<0)
ck=rand()%5+1;
sk+=ck;
if(ck>0){
cout<<"你上表现较好, 老师奖励了你";
cout<<ck<<"个名片\n";
rizhi[rzcnt+1]="老师奖励"+tostr(ck)+"个名片";
}
else if(ck<0){
cout<<"你上课表现较差, 老师扣了你";
cout<<abs(ck)<<"个名片\n";
ck=abs(ck);
rizhi[rzcnt+1]="老师扣除"+tostr(ck)+"个名片";
}
else{
cout<<"你上课啥都没干\n";
rizhi[rzcnt+1]="啥也没干";
}
Sleep(500);
rzcnt++;
if(rzcnt==10001){
rzcnt==10000;
for(int i=2;i<=10001;i++){
rizhi[i-1]=rizhi[i];
}
}
system("pause");
}
else if(input=="2"){
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
cout<<"╭────╭────╭────╭────╭────╭────╭────╭───────╮\n";
for(int i=1;i<=4;i++)
cout<<"│ │ │ │ │ │ │ │ │\n";
cout<<"╰────╰────╰────╰────╰────╰────╰────╰───────╯\n";
cout<<"\n\n\n\n\n\n\n\n";
cout<<"输入卡牌序号, 表示你所抽的卡牌\n";
cout<<"范围: 1~8\n";
cout<<" □×6 抽取\n";
cin>>input1;
rk=rand()%8+1;
if(input1<1 || input1>8){
cout<<" 无法抽取, 没有这张卡\n";
rizhi[rzcnt+1]="抽卡错误,未选择范围内卡片";
}
else if(sk>=6 && card[rk]==0){
cout<<"你抽到了卡牌 "<<people[rk]<<" \n";
card[rk]++;
sk-=6;
rizhi[rzcnt+1]="抽到(新卡)"+people[rk];
}
else if(sk>=6 && card[rk]>0){
cout<<"你的卡牌 "<<people[rk]<<" 加了一颗星\n";
card[rk]++;
sk-=6;
rizhi[rzcnt+1]="抽到(+一颗星)"+people[rk];
}
else{
cout<<" 无法抽取, 名片不足\n";
rizhi[rzcnt+1]="无法抽取, 名片不足";
}
Sleep(500);
rzcnt++;
if(rzcnt==10001){
rzcnt==10000;
for(int i=2;i<=10001;i++){
rizhi[i-1]=rizhi[i];
}
}
system("pause");
}
else if(input=="3")
return 0;
else if(input=="4"){
for(int i=1;i<=rzcnt;i++){
cout<<i<<"."<<rizhi[i]<<endl;
}
system("pause");
}
}
return 0;
}
浅浅开发了一下,加了一个日志功能