aboutsummaryrefslogtreecommitdiff
path: root/include/tak.c
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2021-01-15 23:45:16 -0500
committertslil <tslil@posteo.de>2021-01-15 23:45:16 -0500
commite945328f7b06a62d76365ab90578871b073f4735 (patch)
tree24fb3f4858184f49f337e57662db5c6f42f8700e /include/tak.c
parent2f6b5d5ba8e1ffb627bb146238b1566ec53241a4 (diff)
Dragon is not separate, fixed concession, allowing playing as b/w
Diffstat (limited to 'include/tak.c')
-rw-r--r--include/tak.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/tak.c b/include/tak.c
index 2ddb78b..d8d0a8e 100644
--- a/include/tak.c
+++ b/include/tak.c
@@ -330,14 +330,12 @@ check_win(void) {
rb = check_road_colour(C_BLACK);
rw = check_road_colour(C_WHITE);
- if (rb == WIN_ROAD_BLACK) {
- if (rw == WIN_ROAD_WHITE) {
- return WIN_DRAGON;
- } else {
- return WIN_ROAD_BLACK;
- }
+ if (rb == WIN_ROAD_BLACK && rw == WIN_ROAD_WHITE) {
+ return (ply & 1) ? rb : rw; // Dragons
} else if (rw == WIN_ROAD_WHITE) {
return rw;
+ } else if (rb == WIN_ROAD_BLACK) {
+ return rb;
}
// Do we do a flat count?