summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Wadham <[email protected]>2015-07-13 14:14:09 +1000
committerIan Wadham <[email protected]>2015-07-13 14:14:09 +1000
commita54a03f0ab175d590799442a61e62f6203b7dcf4 (patch)
tree756202fb5c03f7b2943fd6d225204a58cc94221c
parent685cecccc2ccd621b35592a6737fc2a1bc16881c (diff)
Fix the data-entry code for Killer Sudoku cages of size 2.
-rw-r--r--src/gui/ksudokugame.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/ksudokugame.cpp b/src/gui/ksudokugame.cpp
index b83172c..b860a82 100644
--- a/src/gui/ksudokugame.cpp
+++ b/src/gui/ksudokugame.cpp
@@ -358,7 +358,10 @@ bool Game::addToCage (int pos, int val)
}
}
- // TODO - In Killer Sudoku, show the operator during data-entry.
+ // Valid keystroke and position: store and display the current cage.
+ if (m_private->m_cage.indexOf (pos) < 0) {
+ m_private->m_cage.append (pos); // Add cell to current cage.
+ }
if (t == KillerSudoku) {
if (cageOp != NoOperator) {
KMessageBox::information (messageParent(),
@@ -369,12 +372,8 @@ bool Game::addToCage (int pos, int val)
// Set the operator to none or Add, depending on the cage-size.
cageOp = (m_private->m_cage.size() > 1) ? Add : NoOperator;
}
-
- // Valid keystroke and position: store and display the current cage.
+ // TODO - In Killer Sudoku, show the operator during data-entry.
m_private->m_cageOperator = cageOp;
- if (m_private->m_cage.indexOf (pos) < 0) {
- m_private->m_cage.append (pos); // Add cell to current cage.
- }
// Change the last cage in the data-model in the SKGraph object.
if (m_private->m_currentCageSaved) { // If new cage, skip dropping.