Skip to content

Commit

Permalink
Error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
squee72564 committed Jan 7, 2024
1 parent 9c607ad commit 5e9b437
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions views/minesweeper_game_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ static void setup_board(MineSweeperGameScreen* instance) {
uint16_t rand_pos;
uint16_t x;
uint16_t y;

bool is_invalid_position;
do {

rand_pos = furi_hal_random_get() % board_tile_count;
x = rand_pos / board_width;
y = rand_pos % board_width;

bool is_invalid_position = ((rand_pos == 0) ||
is_invalid_position = ((rand_pos == 0) ||
(x==0 && y==1) ||
(x==1 && y==0) ||
rand_pos == board_tile_count-1 ||
Expand Down Expand Up @@ -769,7 +769,7 @@ static bool mine_sweeper_game_screen_view_end_input_callback(InputEvent* event,
MineSweeperGameScreen* instance = context;
bool consumed = false;

if (event->type == InputTypePress) {
if (event->type == InputTypePress || event->type == InputTypeRepeat) {

with_view_model(
instance->view,
Expand Down

0 comments on commit 5e9b437

Please sign in to comment.