Update chess_app.c

This commit is contained in:
RogueMaster
2022-09-16 20:24:45 -04:00
parent b94f94aaee
commit 6304843fd0
+5 -2
View File
@@ -415,11 +415,12 @@ static void make_move(uint8_t file1, uint8_t rank1, uint8_t file2, uint8_t rank2
move2str(white_move_str, game, game->moveListLen - 1);
notify_click();
black_move_str[0] = 0;
anim = furi_hal_get_tick();
anim = furi_hal_os_tick();
thinking = true;
}
static int32_t make_ai_move(void* context) {
UNUSED(context);
// thinking = true;
int depth = 1;
Move move;
@@ -430,7 +431,7 @@ static int32_t make_ai_move(void* context) {
move2str(black_move_str, game, game->moveListLen - 1);
notify_click();
thinking = false;
anim = furi_hal_get_tick();
anim = furi_hal_os_tick();
return 0;
}
@@ -461,6 +462,7 @@ static void run_ai_thread() {
}
static void chess_draw_callback(Canvas* canvas, void* ctx) {
UNUSED(ctx);
should_update_screen = false;
canvas_clear(canvas);
@@ -562,6 +564,7 @@ static void chess_draw_callback(Canvas* canvas, void* ctx) {
}
static void chess_input_callback(InputEvent* event, void* ctx) {
UNUSED(ctx);
if(event->type == InputTypeShort) {
if(event->key == InputKeyLeft) {
sel.col = (sel.col == 0) ? 0 : sel.col - 1;