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];
8 char* answer;
9
10 while(1)
11 {
12 fgets(input, 50, 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 puts("Bye!");
21 delete_game(game);
22}
23