Created
April 24, 2018 10:09
-
-
Save Thanatossan/fb76c8c7035ae4b177fe72c8c69115ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 ¤tplayer,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; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 ¤tplayer,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