From f00c625cdf861b14884dc1a457e14dafbec83bbd Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 3 Jul 2003 18:19:13 +0000 Subject: [PATCH] Always issue NOBID after bidding. Fixed to use game from command line. --- boards/min01 | 33 +++++++++++++++++++++++++++++++++ boards/min15 | 33 +++++++++++++++++++++++++++++++++ src/rrsolve.c | 11 ++++------- 3 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 boards/min01 create mode 100644 boards/min15 diff --git a/boards/min01 b/boards/min01 new file mode 100644 index 0000000..b07c7ba --- /dev/null +++ b/boards/min01 @@ -0,0 +1,33 @@ + === === === === === === === === === === === === === === === === +|... ...|... ... ... ... ... ... ... ... ...|... ... ... ... r..| + === === +|... ... ... ...|.rc ... ... ... ... ... ... ...|.gs ... ... ...| + === +|... .gt|... ... ... ... ... ... ... ... ... ... ... ...|.ro ...| + === +|... ... ... ... ... ... .yo|...|.ww ... ... ... ... ... ... ...| + === === +|... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...| + === +|... ... ... ... ... ... ... ... ... .bc|... ... ... ... ... ...| + === === === +|... ... ...|Ybs ... ... ... ... ... ... ... .YT|... ... ... ...| + === === === +|... ... ... ... ... ... ...|... ...|... ... ... ... ... ... ...| + +|... ... ... ... ...|.ys ...|... ...|... ... ... ... ... ... ...| + === === === === === +|... ...|.gc ... ... ... ... ... ... ... ... ... ...|.go ... ...| + +|... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...| + === +|... ... ... ... ... ... ... ... ...|.yc ... ... ... ... ... ...| + === === +|... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...| + === === +|... ... ... ... .bo|... ... ... ... ... ... ... ... ... .rs|...| + +|... .rt|... ... ... ... ... ... ... ...|.bt ... ... ... ... ...| + === === +|g.. ... ... ... ... ...|... ... ... ... ... ...|... ... ... b..| + === === === === === === === === === === === === === === === === diff --git a/boards/min15 b/boards/min15 new file mode 100644 index 0000000..d26b23f --- /dev/null +++ b/boards/min15 @@ -0,0 +1,33 @@ + === === === === === === === === === === === === === === === === +|... ... ... ...|... ... ... ... ... ... ...|... ... ... ... ...| + === +|... ... ... ... ... ... ... ... ... ... ... ...|.gs ... ... ...| + +|... ... ... ... ... .bo|... ... ... ... ... ... ... ...|gro ...| + === === +|... ... ... ... ... ... ... ...|.ww ... ... ... ... ... ... ...| + === +|... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...| + === === +|... ... .gc|... Y.. ... ...|.rt ... .bc|... ... ... ... ... ...| + === === === === +|... ... ... ... ... ... ... ... ... ... ... .yt|... ... ... ...| + === === === +|...|.YS ... ... ... ... ...|... ...|... ... ... ... ... ... ...| + +|... ... ... ... ... ... ...|... ...|... ... ... ... ... ... ...| + === === === === === +|... .yo|... ... ...|.bs ... ... ... ... ... ... ...|.go ... ...| + +|... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...| + === === +|... ... ... ... ... ... ... ... ...|.yc ... ... ... ... ... ...| + === +|... ... ... ... ... ... .rc|... ... ... ... ... ... ... ... ...| + === === +|... ... ... ... ... ... ... ... ... ... ... ... ... ... .rs|...| + +|... ...|.gt ... ... ... ... ... ... ...|.bt ... ... ... ... ...| + === === +|... ... ... ... ... ...|r.. ... ... ... ... ...|b.. ... ... ...| + === === === === === === === === === === === === === === === === diff --git a/src/rrsolve.c b/src/rrsolve.c index fd85a57..1057481 100644 --- a/src/rrsolve.c +++ b/src/rrsolve.c @@ -32,11 +32,6 @@ #include "rrsolve.h" -#define HOST "localhost" -#define PORT "5252" -#define USER "rrsolve" -#define GAME "game" - /* Tuning this can reduce excess reallocs */ #define RRS_BRANCHING_FACTOR_ESTIMATE 10 @@ -106,9 +101,9 @@ main (int argc, char *argv[]) return 1; } - status = rr_client_join (client, GAME); + status = rr_client_join (client, args.game); if (status == RR_STATUS_NO_GAME) - status = rr_client_new (client, GAME); + status = rr_client_new (client, args.game); if (status) { fprintf (stderr, "Error joining or creating game: %s\n", rr_status_str (status)); return 1; @@ -151,6 +146,7 @@ handle_events (rr_client_t *client) rrs_solution_init (&solution); solve_board (board, &solution); rr_client_bid (client, solution.num_moves); + rr_client_nobid (client); } while (1) { @@ -187,6 +183,7 @@ handle_events (rr_client_t *client) rrs_solution_init (&solution); solve_board (board, &solution); rr_client_bid (client, solution.num_moves); + rr_client_nobid (client); break; case RR_NOTICE_ACTIVATE: for (i = 0; i < solution.num_moves; i++) { -- 2.43.0