Allow you to wrap around the edges with the cursor.

This commit is contained in:
Jeremy Rand 2015-07-16 11:46:52 -05:00
parent eeac94cef3
commit a4ac18ffa2
1 changed files with 16 additions and 0 deletions

View File

@ -557,6 +557,10 @@ bool playGame(void)
cursorY--;
refreshPos(cursorX, cursorY);
refreshPos(cursorX, cursorY + 1);
} else {
cursorY = BOARD_SIZE - 1;
refreshPos(cursorX, cursorY);
refreshPos(cursorX, 0);
}
break;
@ -567,6 +571,10 @@ bool playGame(void)
cursorX--;
refreshPos(cursorX, cursorY);
refreshPos(cursorX + 1, cursorY);
} else {
cursorX = BOARD_SIZE - 1;
refreshPos(cursorX, cursorY);
refreshPos(0, cursorY);
}
break;
@ -577,6 +585,10 @@ bool playGame(void)
cursorX++;
refreshPos(cursorX, cursorY);
refreshPos(cursorX - 1, cursorY);
} else {
cursorX = 0;
refreshPos(cursorX, cursorY);
refreshPos(BOARD_SIZE - 1, cursorY);
}
break;
@ -587,6 +599,10 @@ bool playGame(void)
cursorY++;
refreshPos(cursorX, cursorY);
refreshPos(cursorX, cursorY - 1);
} else {
cursorY = 0;
refreshPos(cursorX, cursorY);
refreshPos(cursorX, BOARD_SIZE - 1);
}
break;