Command-line solver was dividing up non-square puzzles the wrong way

round.

[originally from svn r5691]
This commit is contained in:
Simon Tatham
2005-04-27 16:59:18 +00:00
parent 4ba97c64fe
commit 8b31b4606c

6
solo.c
View File

@ -2054,18 +2054,18 @@ int main(int argc, char **argv)
c = 'a' + c-10;
printf("%c", c);
if (x+1 < p->c * p->r) {
if ((x+1) % p->c)
if ((x+1) % p->r)
printf(" ");
else
printf(" | ");
}
}
printf("\n");
if (y+1 < p->c * p->r && (y+1) % p->r == 0) {
if (y+1 < p->c * p->r && (y+1) % p->c == 0) {
for (x = 0; x < p->c * p->r; x++) {
printf("-");
if (x+1 < p->c * p->r) {
if ((x+1) % p->c)
if ((x+1) % p->r)
printf("-");
else
printf("-+-");