Subversion Repositories Games.Chess Giants

Rev

Rev 136 | Rev 171 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 136 Rev 150
Line 151... Line 151...
151
   }
151
   }
152
 
152
 
153
   // if either of the players is a chess engine, start it
153
   // if either of the players is a chess engine, start it
154
   for (program_index = 0; program_index < options.engine.program_count; program_index++)
154
   for (program_index = 0; program_index < options.engine.program_count; program_index++)
155
   {
155
   {
156
      if (wcscmp (game->black_str, options.engine.programs[program_index].name) == 0)
156
      if (wcscmp (game->black_str, options.engine.programs[program_index].friendly_name) == 0)
157
      {
157
      {
158
         options.engine.selected_program = program_index; // update the preferred chess engine (FIXME: we should not)
158
         options.engine.selected_program = program_index; // update the preferred chess engine (FIXME: we should not)
159
         Player_Shutdown (&board->players[COLOR_BLACK]);
159
         Player_Shutdown (&board->players[COLOR_BLACK]);
160
         Player_Init (&board->players[COLOR_BLACK], COLOR_BLACK, PLAYER_COMPUTER);
160
         Player_Init (&board->players[COLOR_BLACK], COLOR_BLACK, PLAYER_COMPUTER);
161
      }
161
      }
162
      if (wcscmp (game->white_str, options.engine.programs[program_index].name) == 0)
162
      if (wcscmp (game->white_str, options.engine.programs[program_index].friendly_name) == 0)
163
      {
163
      {
164
         options.engine.selected_program = program_index; // update the preferred chess engine (FIXME: we should not)
164
         options.engine.selected_program = program_index; // update the preferred chess engine (FIXME: we should not)
165
         Player_Shutdown (&board->players[COLOR_WHITE]);
165
         Player_Shutdown (&board->players[COLOR_WHITE]);
166
         Player_Init (&board->players[COLOR_WHITE], COLOR_WHITE, PLAYER_COMPUTER);
166
         Player_Init (&board->players[COLOR_WHITE], COLOR_WHITE, PLAYER_COMPUTER);
167
      }
167
      }