Skip to content

Commit

Permalink
Changing edit and evaluation hotkeys.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericojordan committed Jul 5, 2017
1 parent 50770f1 commit 4229c20
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/fast-chess-gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,12 @@ void handleEvent(SDL_Event event, Game * game, char * color, BOOL * hasAI, int *
break;

case SDLK_e:
printf("Board evaluation = %.2f\n", staticEvaluation(&(game->position))/100.0);
*editing = *editing?FALSE:TRUE;
if (*editing) {
*lastMove = 0;
*hasAI = FALSE;
}
printf("Editing %s.\n", *editing?"enabled":"disabled");
fflush(stdout);
break;

Expand Down Expand Up @@ -680,16 +685,10 @@ void handleEvent(SDL_Event event, Game * game, char * color, BOOL * hasAI, int *
break;

case SDLK_v:
*editing = *editing?FALSE:TRUE;
if (*editing) {
*lastMove = 0;
*hasAI = FALSE;
}
printf("Editing %s.\n", *editing?"enabled":"disabled");
printf("Board evaluation = %.2f\n", staticEvaluation(&(game->position))/100.0);
fflush(stdout);
break;


case SDLK_UP:
(*AIdepth)++;
printf("Search base depth increased to %d.\n", *AIdepth);
Expand Down

0 comments on commit 4229c20

Please sign in to comment.