Skip to content

Instantly share code, notes, and snippets.

@Thanatossan
Created April 24, 2018 10:09
Show Gist options
  • Save Thanatossan/fb76c8c7035ae4b177fe72c8c69115ec to your computer and use it in GitHub Desktop.
Save Thanatossan/fb76c8c7035ae4b177fe72c8c69115ec to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
#include <string>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;
class bot{
public:
int side; // 1 is good -1 is bad
string character; // 1 is merlin 2 is servant of merlin 0 is assassin -1 is mondred -2 is servant of mondred
string name; //just a name
int botnumber; // bot number 1 number 2 blah blah...
int doubt; //use in bot function to tell what bot is doubt include player **if use in another fuction plaese set it 0
int current; //if current is '0' it means undentify side '1' is mean good side and '2' is bad side **if use in another fuction plaese set it 0
int king ; // to tell is a king or not 1 =king 0=a normal guy
int quest; // to tell who is going to do quest
int approve;
bot(int ,string ,string ,int ,int,int,int ) ; //to keep data of character
vector<int> getstates(); //to throw the bot construct into vector
void roleSet(int); //setting n players role format.
void shuffle(); //shuffle all roles before showing.
void showRole(); //show your character and ability.
};
class Avalon
{
public:
int side; //player
string character; //player
string name; //player
int doubt; //player
int current; //player
int checkturn;
int scoreoverall;
int king ; // to tell is a king or not 1 =king 0=a normal guy
int quest; // to tell who is going to do quest
bot *bots;
int approve;
vector<string> allCharacter ;
Avalon(string ,string ,int ,int,int,int );
void chooseplayer(int numberofplayer,Avalon &currentplayer,int votephase1count);
void botfunction1(int numberofplayer,int m,bot *,bot *,bot *);
void roleSet(int); //setting n players role format.
void shuffle(); //shuffle all roles before showing.
void showRole(); //show your character and ability.
};
Avalon::Avalon (string n,string charac,int s=0,int d=0,int k=0,int q=0) {
name=n;
character=charac;
side= s;
doubt=d;
king=k;
quest=q;
}
bot::bot (int botnum,string n,string charac=0,int s=0,int d=0,int k=0,int q=0) {
name=n;
character=charac;
botnumber=botnum;
side= s;
doubt=d;
king=k;
quest=q;
approve=0;
}
#include <iostream>
#include <vector>
#include <string>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;
class bot{
public:
int side; // 1 is good -1 is bad
string character; // 1 is merlin 2 is servant of merlin 0 is assassin -1 is mondred -2 is servant of mondred
string name; //just a name
int botnumber; // bot number 1 number 2 blah blah...
int doubt; //use in bot function to tell what bot is doubt include player **if use in another fuction plaese set it 0
int current; //if current is '0' it means undentify side '1' is mean good side and '2' is bad side **if use in another fuction plaese set it 0
int king ; // to tell is a king or not 1 =king 0=a normal guy
int quest; // to tell who is going to do quest
int approve;
bot(int ,string ,string ,int ,int,int,int ) ; //to keep data of character
vector<int> getstates(); //to throw the bot construct into vector
void roleSet(int); //setting n players role format.
void shuffle(); //shuffle all roles before showing.
void showRole(); //show your character and ability.
};
class Avalon
{
public:
int side; //player
string character; //player
string name; //player
int doubt; //player
int current; //player
int checkturn;
int scoreoverall;
int king ; // to tell is a king or not 1 =king 0=a normal guy
int quest; // to tell who is going to do quest
bot *bots;
int approve;
vector<string> allCharacter ;
Avalon(string ,string ,int ,int,int,int );
void chooseplayer(int numberofplayer,Avalon &currentplayer,int votephase1count);
void botfunction1(int numberofplayer,int m,bot *,bot *,bot *);
void roleSet(int); //setting n players role format.
void shuffle(); //shuffle all roles before showing.
void showRole(); //show your character and ability.
};
Avalon::Avalon (string n,string charac,int s=0,int d=0,int k=0,int q=0) {
name=n;
character=charac;
side= s;
doubt=d;
king=k;
quest=q;
}
bot::bot (int botnum,string n,string charac=0,int s=0,int d=0,int k=0,int q=0) {
name=n;
character=charac;
botnumber=botnum;
side= s;
doubt=d;
king=k;
quest=q;
approve=0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment