(void) printf(" c = columns in the report (optional)\n");
} else {
special = atoi(argv[1]);
+
total = atoi(argv[2]);
if (total < special) {
(void) printf("Can't have more specials than total cards!\n");
exit(-1);
- }
-
+ } else if (total <= BASEHAND) {
+ (void) printf("All specials would be in the initial hand!\n");
+ exit(-1);
+ }
if (total - BASEHAND < TURNS_DEFAULT)
turns = total - BASEHAND;
columns = special + 1;
if (argc >= 5)
columns = atoi(argv[4]);
- if (columns > special) {
+ if (columns > special + 1) {
(void) printf("using %d columns because can only have ",special+1);
(void) printf("0 to %d specials\n",special);
- columns = special+1;
+ columns = special + 1;
}
(void) printf("%d specials out of %d total; %d turns, %d columns\n",