UCT: Fix scoring after pass-pass in tree
[pachi/json.git] / stone.c
blob96a45c1032f62f042a8ab3c5887a424239ed564b
1 #include <ctype.h>
2 #include <stdio.h>
3 #include <stdlib.h>
5 #include "stone.h"
7 char *
8 stone2str(enum stone s)
10 switch (s) {
11 case S_BLACK: return "black";
12 case S_WHITE: return "white";
13 default: return "none";
17 enum stone
18 str2stone(char *str)
20 switch (tolower(*str)) {
21 case 'b': return S_BLACK;
22 case 'w': return S_WHITE;
23 default: return S_NONE;