File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -407,25 +407,25 @@ int32_t minesweeper_app(void* p) {
407407 case InputKeyUp :
408408 minesweeper_state -> cursor_y -- ;
409409 if (minesweeper_state -> cursor_y < 0 ) {
410- minesweeper_state -> cursor_y = 0 ;
410+ minesweeper_state -> cursor_y = PLAYFIELD_HEIGHT - 1 ;
411411 }
412412 break ;
413413 case InputKeyDown :
414414 minesweeper_state -> cursor_y ++ ;
415415 if (minesweeper_state -> cursor_y >= PLAYFIELD_HEIGHT ) {
416- minesweeper_state -> cursor_y = PLAYFIELD_HEIGHT - 1 ;
416+ minesweeper_state -> cursor_y = 0 ;
417417 }
418418 break ;
419419 case InputKeyRight :
420420 minesweeper_state -> cursor_x ++ ;
421421 if (minesweeper_state -> cursor_x >= PLAYFIELD_WIDTH ) {
422- minesweeper_state -> cursor_x = PLAYFIELD_WIDTH - 1 ;
422+ minesweeper_state -> cursor_x = 0 ;
423423 }
424424 break ;
425425 case InputKeyLeft :
426426 minesweeper_state -> cursor_x -- ;
427427 if (minesweeper_state -> cursor_x < 0 ) {
428- minesweeper_state -> cursor_x = 0 ;
428+ minesweeper_state -> cursor_x = PLAYFIELD_WIDTH - 1 ;
429429 }
430430 break ;
431431 case InputKeyOk :
You can’t perform that action at this time.
0 commit comments