-static void
-showcapture(char* line)
-{
- int str;
- int move;
-
- gg_assert(line);
- str = string_to_location(board_size, line);
- if (str == NO_MOVE || board[str] == EMPTY) {
- printf("\ninvalid point!\n");
- return;
- }
-
- if (attack(str, &move))
- mprintf("\nSuccessful attack of %1m at %1m\n", str, move);
- else
- mprintf("\n%1m cannot be attacked\n", str);
-}
-
-static void
-showdefense(char* line)
-{
- int str;
- int move;
-
- gg_assert(line);
- str = string_to_location(board_size, line);
- if (str == NO_MOVE || board[str] == EMPTY) {
- printf("\ninvalid point!\n");
- return;
- }
-
- if (attack(str, NULL)) {
- if (find_defense(str, &move))
- mprintf("\nSuccessful defense of %1m at %1m\n", str, move);
- else
- mprintf("\n%1m cannot be defended\n", str);
- } else
- mprintf("\nThere is no need to defend %1m\n", str);
-}
-
-static void
-twoplayer_goto(Gameinfo* gameinfo, char* line)
-{
- const char* movenumber = line;
-
- if (!line)
- return;
-
- if (!strncmp(line, "last", 4))
- movenumber = "9999";
- else if (!strncmp(line, "first", 4))
- movenumber = "1";
-
- printf("goto %s\n", movenumber);
- gameinfo_play_sgftree(gameinfo, &sgftree, movenumber);
-}
-
-static void
-twoplayer_free_handicap(Gameinfo* gameinfo, char* handicap_string)
-{
- int handi;
- int i;
- char line[80];
- int stones[MAX_BOARD * MAX_BOARD];
-
- if (sscanf(handicap_string, "%d", &handi) == 1) {
- /* GNU Go is to place handicap */
- if (handi < 0 || handi == 1) {
- printf("\nInvalid command syntax!\n");
- return;
- }
-
- clear_board();
- handi = place_free_handicap(handi);
- printf("\nPlaced %d stones of free handicap.\n", handi);
- } else { /* User is to place handicap */
- clear_board();
- handi = 0;
-
- while (1) {
- twoplayer_showboard();
- printf("\nType in coordinates of next handicap stone, or one of the following commands:\n");
- printf(" undo take back the last stone placed\n");
- printf(" clear remove all the stones placed so far\n");
- printf(" done finish placing handicap\n\n");
- printf("You have placed %d handicap stone(s) so far.\n\n", handi);
-
- if (!fgets(line, 80, stdin))
- return; /* EOF or some error */
- for (i = 0; i < 80; i++)
- line[i] = tolower((int)line[i]);
-
- if (!strncmp(line, "undo", 4)) {
- if (!handi)
- printf("\nNothing to undo.\n");
- else {
- remove_stone(stones[--handi]);
- gprintf("\nRemoved the stone at %m.\n", I(stones[handi]),
- J(stones[handi]));
- }
- } else if (!strncmp(line, "clear", 5)) {
- clear_board();
- handi = 0;
- } else if (!strncmp(line, "done", 4)) {
- if (handi == 1) /* Don't bother with checks later */
- printf("\nHandicap cannot be one stone. Either add "
- "some more, or delete the only stone.\n");
- else
- break;
- } else {
- int pos = string_to_location(board_size, line);
- if (pos != NO_MOVE) {
- if (board[pos] != EMPTY)
- printf("\nThere's already a stone there.\n");
- else {
- add_stone(pos, BLACK);
- stones[handi++] = pos;
- }
- } else
- printf("\nInvalid command: %s", line);
- }
- }
- }
- gameinfo->handicap = handi;
- gameinfo->to_move = (handi ? WHITE : BLACK);
-}
+//static void
+//showcapture(char* line)
+//{
+// int str;
+// int move;
+//
+// gg_assert(line);
+// str = string_to_location(board_size, line);
+// if (str == NO_MOVE || board[str] == EMPTY) {
+// printf("\ninvalid point!\n");
+// return;
+// }
+//
+// if (attack(str, &move))
+// mprintf("\nSuccessful attack of %1m at %1m\n", str, move);
+// else
+// mprintf("\n%1m cannot be attacked\n", str);
+//}
+
+//static void
+//showdefense(char* line)
+//{
+// int str;
+// int move;
+//
+// gg_assert(line);
+// str = string_to_location(board_size, line);
+// if (str == NO_MOVE || board[str] == EMPTY) {
+// printf("\ninvalid point!\n");
+// return;
+// }
+//
+// if (attack(str, NULL)) {
+// if (find_defense(str, &move))
+// mprintf("\nSuccessful defense of %1m at %1m\n", str, move);
+// else
+// mprintf("\n%1m cannot be defended\n", str);
+// } else
+// mprintf("\nThere is no need to defend %1m\n", str);
+//}
+
+//static void
+//twoplayer_goto(Gameinfo* gameinfo, char* line)
+//{
+// const char* movenumber = line;
+//
+// if (!line)
+// return;
+//
+// if (!strncmp(line, "last", 4))
+// movenumber = "9999";
+// else if (!strncmp(line, "first", 4))
+// movenumber = "1";
+//
+// printf("goto %s\n", movenumber);
+// gameinfo_play_sgftree(gameinfo, &sgftree, movenumber);
+//}
+
+//static void
+//twoplayer_free_handicap(Gameinfo* gameinfo, char* handicap_string)
+//{
+// int handi;
+// int i;
+// char line[80];
+// int stones[MAX_BOARD * MAX_BOARD];
+//
+// if (sscanf(handicap_string, "%d", &handi) == 1) {
+// /* GNU Go is to place handicap */
+// if (handi < 0 || handi == 1) {
+// printf("\nInvalid command syntax!\n");
+// return;
+// }
+//
+// clear_board();
+// handi = place_free_handicap(handi);
+// printf("\nPlaced %d stones of free handicap.\n", handi);
+// } else { /* User is to place handicap */
+// clear_board();
+// handi = 0;
+//
+// while (1) {
+// twoplayer_showboard();
+// printf("\nType in coordinates of next handicap stone, or one of the following commands:\n");
+// printf(" undo take back the last stone placed\n");
+// printf(" clear remove all the stones placed so far\n");
+// printf(" done finish placing handicap\n\n");
+// printf("You have placed %d handicap stone(s) so far.\n\n", handi);
+//
+// if (!fgets(line, 80, stdin))
+// return; /* EOF or some error */
+// for (i = 0; i < 80; i++)
+// line[i] = tolower((int)line[i]);
+//
+// if (!strncmp(line, "undo", 4)) {
+// if (!handi)
+// printf("\nNothing to undo.\n");
+// else {
+// remove_stone(stones[--handi]);
+// gprintf("\nRemoved the stone at %m.\n", I(stones[handi]),
+// J(stones[handi]));
+// }
+// } else if (!strncmp(line, "clear", 5)) {
+// clear_board();
+// handi = 0;
+// } else if (!strncmp(line, "done", 4)) {
+// if (handi == 1) /* Don't bother with checks later */
+// printf("\nHandicap cannot be one stone. Either add "
+// "some more, or delete the only stone.\n");
+// else
+// break;
+// } else {
+// int pos = string_to_location(board_size, line);
+// if (pos != NO_MOVE) {
+// if (board[pos] != EMPTY)
+// printf("\nThere's already a stone there.\n");
+// else {
+// add_stone(pos, BLACK);
+// stones[handi++] = pos;
+// }
+// } else
+// printf("\nInvalid command: %s", line);
+// }
+// }
+// }
+// gameinfo->handicap = handi;
+// gameinfo->to_move = (handi ? WHITE : BLACK);
+//}