From: simon Date: Wed, 27 Apr 2005 16:59:18 +0000 (+0000) Subject: Command-line solver was dividing up non-square puzzles the wrong way X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/commitdiff_plain/f9a2883b7a732565c798848dbd8f040c40520b52 Command-line solver was dividing up non-square puzzles the wrong way round. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5691 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/solo.c b/solo.c index 1448c99..0f3400c 100644 --- a/solo.c +++ b/solo.c @@ -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("-+-");