#include <iostream>//C输入输出流库
#include <cstdlib>//使用srand函数要用到这个库
#include <ctime>//使用time函数要用到这个库
#include <Windows.h>
#include <conio.h>
using namespace std;
void brc()
{
system("cls");
int jy=1;
int sy=3;
srand((int)time(0));
int n=rand()%15+1;
cout<<" 你是"<<n<<"号"<<endl;
cout<<" 正在分配身份"<<endl;
Sleep(1500);
int m[20];
for(int i=1;i<=15;i)
m[i]=1;
int s[20]={0};
int yy[20]={0};
int l=0,w=0,j=0,p=0;
for(int i=1;i<=15;i++)
{
do
{
int a=rand()%4+1;
if(a==1&&l<2)
{
}
int main()
{
srand((int)time(0));
char a='1';
while(1)
{
system("cls");
cout<<" 杀手游戏"<<endl;
cout<<"--------------------------------------------------------------------------------";
cout<<" 1.开始游戏"<<endl;
cout<<" 2.查看游戏规则"<<endl;
a=getch();
if(a=='1')
{
cout<<" 1. 15人场"<<endl;
cout<<" 2. 30人娱乐战(10猎人)<敬请期待>"<<endl;
a='2';
while(a=='2')
{
a=getch();
switch(a)
{
case '1':
brc();
break;
}
if(a=='1')
break;
}
if(a=='1')
break;
}
else if(a=='2')
{
cout<<"杀手:每当晚上的时候可使用**权杀掉一人"<<endl;//1
cout<<"预言家:每天晚上可以知道一个人的身份"<<endl;//2
cout<<"平民:无技能,当玩家是平民时,在第5天拥有1.5票的投票权"<<endl;//3
cout<<"猎人:此身份仅限于30人娱乐局中,死亡后可带走一人"<<endl;
cout<<"投票细则:\n游戏中除了你以外全是由超级AI人工代替"<<endl;
cout<<"杀手不会杀掉朋友,但不包括投票环节"<<endl;
cout<<"预言家如果预言到杀手将一直对他投票,如果预言到平民将永远不会对他投票"<<endl;
cout<<"平民将投上一个晚上对他投票他的人"<<endl;
cout<<"利用好超级AI游戏规则找出杀手**"<<endl;
system("pause");
}
}
return 0;
}