Commit cd12adce authored by Dirk Mueller's avatar Dirk Mueller
Browse files

fix logic

svn path=/trunk/KDE/kdegames/ksudoku/; revision=769154
parent 796c6541
...@@ -443,7 +443,7 @@ uint SKSolver::removeValuesSimple(QVector<uint>& puzzle, uint hints, uint flags) ...@@ -443,7 +443,7 @@ uint SKSolver::removeValuesSimple(QVector<uint>& puzzle, uint hints, uint flags)
int cellsLeft = size; int cellsLeft = size;
// completely remove all occurrences of a random value // completely remove all occurrences of a random value
if(flags && KSS_REM_1VALUE) { if(flags & KSS_REM_1VALUE) {
uint startValue = RANDOM(order)+1; uint startValue = RANDOM(order)+1;
uint i; uint i;
for(i = startValue; i <= (uint)order; ++i) { for(i = startValue; i <= (uint)order; ++i) {
...@@ -510,7 +510,7 @@ int SKSolver::removeValues(QVector<uint>& puzzle, uint count, uint flags) { ...@@ -510,7 +510,7 @@ int SKSolver::removeValues(QVector<uint>& puzzle, uint count, uint flags) {
QVector<uint> local(puzzle); QVector<uint> local(puzzle);
int removesLeft = count; int removesLeft = count;
if(flags && KSS_REM_1VALUE) { if(flags & KSS_REM_1VALUE) {
uint startValue = RANDOM(order)+1; uint startValue = RANDOM(order)+1;
uint i; uint i;
for(i = startValue; i <= (uint)order; ++i) { for(i = startValue; i <= (uint)order; ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment