c++MC

本文介绍了使用C++编写的一个简易的Minecraft游戏示例,玩家通过输入种子码控制角色史蒂夫在游戏中的行为,包括出生地点选择、砍树、下矿等,最终挑战末影龙或返回主世界。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

上才艺!!!!!!!!!!!!!!!!!!!!!!!

#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
void print() {
	cout << "┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈" << endl;
	cout << "|                                  |" << endl;
	cout << "|                                  |" << endl;
	cout << "|            Minecraft             |" << endl;
	cout << "|               1.9                |" << endl;
	cout << "|              文字版              |" << endl;
	cout << "|                                  |" << endl;
	cout << "|                                  |" << endl;
	cout << "┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈" << endl;
}
int main(){
	int a; 
	print();
	Sleep(5000);
	system("cls");
	cout << "请输入种子码 ;";
	cin >> a;
	if(a <= 300){
		system("cls");
		cout << "你出生在粑粑山里" << endl;
		Sleep(3000);
		cout << "你被淹死了" << endl;
		Sleep(3000);
		cout << "依维柯大金杯,拉完死人拉骨灰";
		return 0;
	}
	system("cls");
	cout <<"你出生在树林里" << endl;
	Sleep(2000);
	cout <<"你要干什么?" << endl;
	cout << "1 砍树" << "    " << "2 下矿";
	int b, c;
	cin >> b;
	if(b == 1){
		system("cls");
		cout << "你要砍多少树?" << endl;
		cin >> c;
		if(c > 50){
			system("cls");
			cout << "你写的太多了,史蒂夫被你累死了" << endl;
			cout << "依维柯大金杯,拉完死人拉骨灰";
			return 0;
		}
		else{
			system("cls");
			cout << "夜晚来了" << endl;
			cout << "史蒂夫在盖房子" << endl;
			Sleep(9000);
			if(c < 10){
				cout << "史蒂夫没盖成房子,被僵尸小白围殴而死" << endl;
				cout << "依维柯大金杯,拉完死人拉骨灰";
				return 0;				
			}
			else{
				cout << "史蒂夫盖成了房子,度过夜晚" << endl;
				Sleep(3000); 
			}		
		}
	}
	else{
		system("cls");
		cout << "史蒂夫下矿被摔死了" << endl;
		cout << "依维柯大金杯,拉完死人拉骨灰";
		return 0; 
	}
	system("cls");
	cout << "你现在要干什么?" << endl;
	cout << "1 过上美好生活      2 打末影龙";
	int d;
	cin >> d;
	system("cls");
	if(d == 1){
		cout << "你在下矿时被苦力怕炸死了" << endl;
		cout << "依维柯大金杯,拉完死人拉骨灰";
		return 0; 		
	}
	else{
		cout << " YOU WIN " << endl;
		cout << "你要回主世界吗?";
		int e;
		cout << "1 回     2 去末地城";
		cin >> e;
		system("cls");
		if(e == 1){
			cout << "没了" << endl;
			Sleep(20000);
			cout << "再见" << endl;
			Sleep(20000);
			cout << "嘿!" << endl;
			Sleep(1000);
			cout << "没了!";
			Sleep(5000);
			return 0; 
		}
		else{
			cout << "你被潜影贝打死了" << endl;
		    cout << "依维柯大金杯,拉完死人拉骨灰";
		    return 0;			 
		}
	}	
}

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值