gtp-start.c
Raw
1#include <simple-go/simple-go.h>
2#include <simple-go/simple-gtp.h>
3
4int main(int argc, char** argv)
5{
6 game_state* game = create_game(19, 6.5);
7 char input[50] = {0};
8 char* answer;
9
10 while(1)
11 {
12 fgets(input, 49, stdin);
13 if(strcmp(input, "quit\n") == 0)
14 break;
15 answer = handle_gtp_cmd(input, game);
16 printf("%s", answer);
17 free(answer);
18 }
19
20 delete_game(game);
21}
22