
/*
   move_s comp_move;
   char input_reset_board[2], input[256], human_color[2];
   Bool setup_return;
   char color[2];
   char coord_move[6];
*/

/*
   if (argc == 2 && !strcmp(argv[1], "-xboard"))
   xboard();
*/

/*
   printf("Faile version 0.6\nby Adrien (Reggie) Regimbald\n\n");
   rdelay(2);

   new_game = TRUE;

   while(new_game) {

   init_game();

   printf("What color would you like to play? (w/b):  ");
   rinput(human_color, 1);
   if (tolower(human_color[0]) == 'w') comp_color = 2;
   else comp_color = 1;

   printf("Would you like to set up the board? (y/n):  ");
   rinput(input_reset_board, 1);
   setup_return = FALSE;
   if (tolower(input_reset_board[0]) == 'y') {
      while (setup_return == FALSE) {
         printf("Please enter an EPD string:\n");
         parse_epd();
         setup_return = verify_board();
      }
   }

   if (white_to_move == 1) color[0] = 'w';
   else color[0] = 'b';

   rclrscr();
   print_history(1);
   printf("\n");
   print_pos();

   while (!game_end) {

      if ((comp_color %2) == (white_to_move %2)) {

         nodes = 0;
         ply = 0;

         clock0 = clock();
         time0 = time(0);

         #ifdef lines
         lines_out = fopen("lines.txt", "a");
         #endif

         comp_move = think();

         clock_elapsed = (clock()-clock0)/(double)CLOCKS_PER_SEC;
         search_time = difftime(time(0), time0);

         time_left -= search_time;
         time_left += increment;

         #ifdef lines
         fclose(lines_out);
         #endif

         if (((comp_color == 1 && result != black_won) ||
             (comp_color == 2 && result != white_won)) &&
             (result != stalemate)) {
            play_move(comp_move);

            comp_to_coord (comp_move, coord_move);

            if (comp_color == 1) {
               strcpy(history[move_num].white, coord_move);
            }
            else {
               strcpy(history[move_num].black, coord_move);
            }
            white_to_move += 1;
            if (comp_color == 2) move_num++;
         }
         printf("\n");
         print_history(move_num - 1);
         printf("\n");
         print_pos();
         printf("\a");
      }

      if (result) {
         game_end = TRUE;
      }

      else {

         parse_user_input();

         if (!result && !game_end) {
            white_to_move += 1;
            if (comp_color == 1) move_num++;

            print_history(move_num);
            printf("\n");
            print_pos();
         }
         if (result || new_game) break;
      }
   }
   if (new_game) continue;
   if (game_end || result) get_user_input(move_num, &input[0]);
   }
*/
