From 4229c200a176fa2bbb644aff164698e990b7ce07 Mon Sep 17 00:00:00 2001 From: Frederico Jordan Date: Wed, 5 Jul 2017 17:11:16 -0300 Subject: [PATCH] Changing edit and evaluation hotkeys. --- src/fast-chess-gui.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/fast-chess-gui.c b/src/fast-chess-gui.c index 2fcaa78..5670191 100644 --- a/src/fast-chess-gui.c +++ b/src/fast-chess-gui.c @@ -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; @@ -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);