mirror of
https://github.com/jeremysrand/a2sudoku.git
synced 2024-06-05 21:29:28 +00:00
Allow you to wrap around the edges with the cursor.
This commit is contained in:
parent
eeac94cef3
commit
a4ac18ffa2
|
@ -557,6 +557,10 @@ bool playGame(void)
|
||||||
cursorY--;
|
cursorY--;
|
||||||
refreshPos(cursorX, cursorY);
|
refreshPos(cursorX, cursorY);
|
||||||
refreshPos(cursorX, cursorY + 1);
|
refreshPos(cursorX, cursorY + 1);
|
||||||
|
} else {
|
||||||
|
cursorY = BOARD_SIZE - 1;
|
||||||
|
refreshPos(cursorX, cursorY);
|
||||||
|
refreshPos(cursorX, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -567,6 +571,10 @@ bool playGame(void)
|
||||||
cursorX--;
|
cursorX--;
|
||||||
refreshPos(cursorX, cursorY);
|
refreshPos(cursorX, cursorY);
|
||||||
refreshPos(cursorX + 1, cursorY);
|
refreshPos(cursorX + 1, cursorY);
|
||||||
|
} else {
|
||||||
|
cursorX = BOARD_SIZE - 1;
|
||||||
|
refreshPos(cursorX, cursorY);
|
||||||
|
refreshPos(0, cursorY);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -577,6 +585,10 @@ bool playGame(void)
|
||||||
cursorX++;
|
cursorX++;
|
||||||
refreshPos(cursorX, cursorY);
|
refreshPos(cursorX, cursorY);
|
||||||
refreshPos(cursorX - 1, cursorY);
|
refreshPos(cursorX - 1, cursorY);
|
||||||
|
} else {
|
||||||
|
cursorX = 0;
|
||||||
|
refreshPos(cursorX, cursorY);
|
||||||
|
refreshPos(BOARD_SIZE - 1, cursorY);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -587,6 +599,10 @@ bool playGame(void)
|
||||||
cursorY++;
|
cursorY++;
|
||||||
refreshPos(cursorX, cursorY);
|
refreshPos(cursorX, cursorY);
|
||||||
refreshPos(cursorX, cursorY - 1);
|
refreshPos(cursorX, cursorY - 1);
|
||||||
|
} else {
|
||||||
|
cursorY = 0;
|
||||||
|
refreshPos(cursorX, cursorY);
|
||||||
|
refreshPos(cursorX, BOARD_SIZE - 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user