标题
增加 1 行删除 1 行
1恶魔轮盘赌(第二版)1恶魔轮盘赌(第三版)
正文
增加 17 行删除 13 行
12345251 行未改动全部展开2572582592602612622632642655 行未改动271272273274275276277278279280281282283284285286287288289290291292293294311 行未改动全部展开60660760860961061161261361461511 行未改动627628629630631```cpp#include<bits/stdc++.h>using namespace std;#define int long long#define FAIL_FIND (18446744073709551615)251 行未改动全部展开void update(){if(gun.full==0)sure=0;if(gun._empty==0)sure=1;}int AI(){//-1打自己-2打对方1~ITEM_TYPE用道具gun.compute();update();//不那么人机的操作if(hp<MAX_HP&&item.exist(huazi))return huazi;5 行未改动}if(sure==0&&item.exist(beer))return beer;if(sure==0)return -1;if(gun.top>=2&&item.exist(stopper)&&!stopper_used)return stopper;if(item.exist(chief))return chief;if(hp>=2&&hp<=MAX_HP-2&&item.exist(bad_machine))return bad_machine;if(item.exist(bigger))return bigger;if(item.empty()){if((gun.full>=gun._empty-1)||knife_used)return -2;else return -1;}else {if(random(1,3)<=1){if((gun.full>=gun._empty-1)||knife_used)return -2;//用刀肯定不打自己(太唐了)else return -1;}else {while(true){int type=random(1,ITEM_TYPE);if(item.exist(type))return type;}}}}311 行未改动全部展开cout<<endl<<endl<<endl;cout<<"枪里还有"<<gun.top<<"发子弹"<<endl;cout<<"实弹:"<<gun.full<<" 空弹:"<<gun._empty<<endl;if(p1.ai){int _type=p1.AI();compute(p1,p2,_type);if(_type>=1&&_type<=ITEM_TYPE)p1.item.pop(p1.item.bound(_type));}else {cout<<"你要干什么?-1打自己,-2打对方,1~"<<p1.item.top<<"用物品\n";11 行未改动system("cls");}return 0;}```1234567251 行未改动全部展开2592602612622632642652662675 行未改动273274275276277278279280281282283284285286287288289290291292293294295296297298311 行未改动全部展开61061161261361461561661761861962011 行未改动632633634635进行了 AI 的一些微调```c#include<bits/stdc++.h>using namespace std;#define int long long#define FAIL_FIND (18446744073709551615)251 行未改动全部展开void update(){if(gun.full==0)sure=0;if(gun._empty==0)sure=1;}int AI(PLAYER p2){//-1打自己-2打对方1~ITEM_TYPE用道具gun.compute();update();//不那么人机的操作if(hp<MAX_HP&&item.exist(huazi))return huazi;5 行未改动}if(sure==0&&item.exist(beer))return beer;if(sure==0)return -1;if(gun.top>=2&&item.exist(stopper)&&!stopper_used)return stopper;if(item.exist(chief)&&!p2.item.empty())return chief;if(hp>=2&&hp<=MAX_HP-2&&item.exist(bad_machine))return bad_machine;if(item.exist(bigger))return bigger;if(item.empty()){if((gun.full>=gun._empty-1)||knife_used)return -2;else return -1;}else {while(true){int type=random(1,ITEM_TYPE);if(item.exist(type)){if(random(1,3)<=1){if((gun.full>=gun._empty-1)||knife_used)return -2;//用刀肯定不打自己(太唐了)else return -1;}if(hp==MAX_HP&&type==huazi)continue;if(p2.item.empty()&&type==chief)continue;return type;}}}}311 行未改动全部展开cout<<endl<<endl<<endl;cout<<"枪里还有"<<gun.top<<"发子弹"<<endl;cout<<"实弹:"<<gun.full<<" 空弹:"<<gun._empty<<endl;if(p1.ai){int _type=p1.AI(p2);compute(p1,p2,_type);if(_type>=1&&_type<=ITEM_TYPE)p1.item.pop(p1.item.bound(_type));}else {cout<<"你要干什么?-1打自己,-2打对方,1~"<<p1.item.top<<"用物品\n";11 行未改动system("cls");}return 0;}