mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-07 22:58:10 -07:00
Update chess_app.c
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user