https://github.com/criyle/universalbattlejudger
Universal Battle Judger
https://github.com/criyle/universalbattlejudger
Last synced: 5 months ago
JSON representation
Universal Battle Judger
- Host: GitHub
- URL: https://github.com/criyle/universalbattlejudger
- Owner: criyle
- License: gpl-3.0
- Created: 2015-12-14T20:32:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-17T23:45:51.000Z (about 9 years ago)
- Last Synced: 2025-09-10T06:17:00.827Z (9 months ago)
- Language: C++
- Size: 12 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Universal Battle Judger
## General Information
This is a project based on HUSTOJ sandbox. It is used to judge battle programs. It provides automatic compile, judge and error catch.
## communication protocol
string meaning
a x change prensent ai to number x
b x ai step judge finished
c n data put n words to ai
d read from ai, return formate n + data
q judge finished
r n string ai_n's result string
s n x ai_n's result score
k x kill ai_n
## api
void stepend(int);
void judgeend();
putresult
void putresult(int, char *);
void putresult(int, string);
void putresult(int, const char *, ...);
void putscore(int, int);
char readchar();
int readint();
void linescan(const char *, ...);
writestr
void writestr(char *);
void writestr(string);
void writestr(const char *, ...);
void puterr(const char *, ...);
void kill(int x)
## How to use
ai::judger *ju = new ai::judger(oj_home, ai_num);
ju->work();
result save to ju