Skip to content

Instantly share code, notes, and snippets.

View Thanatossan's full-sized avatar
💭
I may be slow to respond.

Sivakorn Wongponkanan Thanatossan

💭
I may be slow to respond.
View GitHub Profile
if(bot1.quest==1){
bot1.approve=1;
if(bot1.side ==-1 && bot1.side==bot2.side){
bot2.approve=1;
}
else{
srand(time(0));
int x1=rand()%2;
if(x1=0) bot2.approve=1;
#include<iostream>
#include<vector>
#include<cstdlib>
#include<iomanip>
#include<ctime>
#include<algorithm>
#include"Structure.h"
using namespace std;
void Approveordecline_bot();
#include <iostream>
#include <vector>
#include <string>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;
class bot{
public:
#include<iostream>
#include<vector>
#include<cstdlib>
#include<iomanip>
#include<ctime>
#include<algorithm>
#include"Structure.h"
using namespace std;
void Approveordecline_bot();
else if(bot1/แก้เป็นbot2/.king ==1){
vector<int> random;
int temp=99;
if(system.checkturn==1){
for(int i=0 ;i<2 ;i++) {
int random=rand()%players +1;
while(temp==random){
random=rand()%players +1;
}
#include<iostream>
#include<vector>
#include<cstdlib>
#include<iomanip>
#include<ctime>
#include<algorithm>
#include"Structure.h"
using namespace std;
#include <iostream>
#include <vector>
#include <string>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;
class bot{
public:
void Avalon::chooseplayer(int numberofplayer,Avalon &currentplayer,int votephase1count){
int n; char vote; bool pass =0;
if(player.king==1)//if player are king
{
do{
if(votephase1count ==5) // In case of decline 5 time
{
return calscore('B');
#include <iostream>
#include <vector>
#include <string>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;
class bot{
int side; // 1 is good -1 is bad
int character; // 1 is merlin 2 is servant of merlin 0 is assassin -1 is mondred -2 is servant of mondred
#include <iostream>
#include <vector>
#include <string>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;
class bot{
int side; // 1 is good -1 is bad
int character; // 1 is merlin 2 is servant of merlin 0 is assassin -1 is mondred -2 is servant of mondred