From: H.G. Muller Date: Mon, 11 Oct 2010 06:56:34 +0000 (+0200) Subject: Represent DragonKing and DragonHorse by D and H X-Git-Url: http://winboard.nl/cgi-bin?p=capablanca.git;a=commitdiff_plain;h=5ab36ba095695208aee106f370331650186dc23b;hp=d047d3cf2718e831b4cb81aba3c4111c041fc22d Represent DragonKing and DragonHorse by D and H Only in the board file it remains J and I. --- diff --git a/lasker-2.2.3/src/algcheck.c b/lasker-2.2.3/src/algcheck.c index c7b6906..065a859 100644 --- a/lasker-2.2.3/src/algcheck.c +++ b/lasker-2.2.3/src/algcheck.c @@ -152,6 +152,8 @@ static int get_move_info(const char *str, int *piece, int *ff, int *fr, int *tf, lpiece = KNIGHT; else if (c == 'p') lpiece = PAWN; + else if (c == 'd') + lpiece = DRAGONKING; else goto nomatch; break; @@ -219,7 +221,7 @@ static void add_promotion(struct game_state_t *gs, const char *mstr, struct move if (s == NULL) { return; } - + if (piecetype(gs->board[mt->fromFile][mt->fromRank]) != PAWN) { return; } @@ -339,6 +341,7 @@ int alg_parse_move(char *mstr, struct game_state_t * gs, struct move_t * mt) break; case HORSE: if(strstr(gs->variant, "great")) piece = PRIESTESS; + if(strstr(gs->variant, "shogi")) piece = DRAGONHORSE; break; case GOLD: if(strstr(gs->variant, "great")) piece = MASTODON; @@ -566,10 +569,10 @@ char *alg_unparse(struct game_state_t * gs, struct move_t * mt) strcpy(mStr, "N"); break; case DRAGONKING: - strcpy(mStr, "J"); + strcpy(mStr, "D"); break; case DRAGONHORSE: - strcpy(mStr, "I"); + strcpy(mStr, "H"); break; case LANCE: strcpy(mStr, "L"); @@ -706,10 +709,10 @@ char *alg_unparse(struct game_state_t * gs, struct move_t * mt) strcat(mStr, "G"); break; case DRAGONHORSE: - strcat(mStr, "I"); + strcat(mStr, "H"); break; case DRAGONKING: - strcat(mStr, "J"); + strcat(mStr, "D"); break; default: break; diff --git a/lasker-2.2.3/src/board.c b/lasker-2.2.3/src/board.c index 315df34..e60f659 100644 --- a/lasker-2.2.3/src/board.c +++ b/lasker-2.2.3/src/board.c @@ -23,9 +23,9 @@ #include "includes.h" -const char *wpstring[] = {" ", "P", "N", "B", "R", "A", "C", "M", "Q", "E", "B", "Q", "W", "H", "N", "J", "I", "L", +const char *wpstring[] = {" ", "P", "N", "B", "R", "A", "C", "M", "Q", "E", "B", "Q", "W", "H", "N", "D", "H", "L", "C", "S", "G", "H", "A", "F", "E", "H", "M", "S", "E", "W", "O", "G", "V", "S", "E", "A", "K"}; -const char *bpstring[] = {" ", "p", "n", "b", "r", "a", "c", "m", "q", "e", "b", "q", "w", "h", "n", "j", "i", "l", +const char *bpstring[] = {" ", "p", "n", "b", "r", "a", "c", "m", "q", "e", "b", "q", "w", "h", "n", "d", "h", "l", "c", "s", "g", "h", "a", "f", "e", "h", "m", "s", "e", "w", "o", "g", "v", "s", "e", "a", "k"}; int pieceValues[KING+1] = {0, 1, 3, 3, 5, 8, 9, 3, 9, 1, 1, 2, 2, 2, 1, 6, 5, 2, 3, 3, 3, 1, 5, 2, 1, 7, 7, 3, 3, 3, 7, 7, 7, 8, 9, 12, 0}; @@ -574,10 +574,10 @@ return 0; static int style1(struct game_state_t *b, struct move_t *ml) { static const char *wp[] = {" |", " P |", " N |", " B |", " R |", " A |", " C |", " M |", " Q |", " E |", " B |", " Q |", - " W |", " H |", " N |", " J |", " I |", " L |", " C |", " S |", " G |", " H |", " A |", " F |", + " W |", " H |", " N |", " D |", " H |", " L |", " C |", " S |", " G |", " H |", " A |", " F |", " E |", " H |", " M |", " S |", " E |", " W |", " O |", " G |", " V |", " S |", " E |", " A |", " K |"}; static const char *bp[] = {" |", " *P|", " *N|", " *B|", " *R|", " *A|", " *C|", " *M|", " *Q|", " *E|", " *B|", " *Q|", - " *W|", " *H|", " *N|", " *J|", " *I|", " *L|", " *C|", " *S|", " *G|", " *H|", " *A|", " *F|", + " *W|", " *H|", " *N|", " *D|", " *H|", " *L|", " *C|", " *S|", " *G|", " *H|", " *A|", " *F|", " *E|", " *H|", " *M|", " *S|", " *E|", " *W|", " *O|", " *G|", " *V|", " *S|", " *E|", " *A|", " *K|"}; static char *wsqr = ""; static char *bsqr = ""; @@ -595,10 +595,10 @@ static int style1(struct game_state_t *b, struct move_t *ml) static int style2(struct game_state_t *b, struct move_t *ml) { static const char *wp[] = {"- ", "P ", "N ", "B ", "R ", "A ", "C ", "M ", "Q ", "E ", "B ", "Q ", - "W ", "H ", "N ", "J ", "I ", "L ", "C ", "S ", "G ", "H ", "A ", "F ", + "W ", "H ", "N ", "D ", "H ", "L ", "C ", "S ", "G ", "H ", "A ", "F ", "E ", "H ", "M ", "S ", "E ", "W ", "O ", "G ", "V ", "S ", "E ", "A ", "K "}; static const char *bp[] = {"+ ", "p' ", "n' ", "b' ", "r' ", "a' ", "c' ", "m' ", "q' ", "e' ", "b' ", "q' ", - "w' ", "h' ", "n' ", "j' ", "i' ", "l' ", "c' ", "s' ", "g' ", "h' ", "a' ", "f' ", + "w' ", "h' ", "n' ", "d' ", "h' ", "l' ", "c' ", "s' ", "g' ", "h' ", "a' ", "f' ", "e' ", "h' ", "m' ", "s' ", "e' ", "w' ", "o' ", "g' ", "v' ", "s' ", "e' ", "a' ", "k' "}; static char *wsqr = ""; static char *bsqr = ""; @@ -616,10 +616,10 @@ static int style2(struct game_state_t *b, struct move_t *ml) static int style3(struct game_state_t *b, struct move_t *ml) { static const char *wp[] = {" ", " P ", " N ", " B ", " R ", " A ", " C ", " M ", " Q ", " E ", " B ", " Q ", - " W ", " H ", " N ", " J ", " I ", " L ", " C ", " S ", " G ", " H ", " A ", " F ", + " W ", " H ", " N ", " D ", " H ", " L ", " C ", " S ", " G ", " H ", " A ", " F ", " E ", " H ", " M ", " S ", " E ", " W ", " O ", " G ", " V ", " S ", " E ", " A ", " K "}; static const char *bp[] = {" ", " *P", " *N", " *B", " *R", " *A", " *C", " *M", " *Q", " *E", " *B", " *Q", - " *W", " *H", " *N", " *J", " *I", " *L", " *C", " *S", " *G", " *H", " *A", " *F", + " *W", " *H", " *N", " *D", " *H", " *L", " *C", " *S", " *G", " *H", " *A", " *F", " *E", " *H", " *M", " *S", " *E", " *W", " *O", " *G", " *V", " *S", " *E", " *A", " *K"}; static char *wsqr = "\033[0m"; static char *bsqr = "\033[7m"; @@ -637,10 +637,10 @@ static int style3(struct game_state_t *b, struct move_t *ml) static int style4(struct game_state_t *b, struct move_t *ml) { static const char *wp[] = {" ", " P ", " N ", " B ", " R ", " A ", " C ", " M ", " Q ", " E ", " B ", " Q ", - " W ", " H ", " N ", " J ", " I ", " L ", " C ", " S ", " G ", " H ", " A ", " F ", + " W ", " H ", " N ", " D ", " H ", " L ", " C ", " S ", " G ", " H ", " A ", " F ", " E ", " H ", " M ", " S ", " E ", " W ", " O ", " G ", " V ", " S ", " E ", " A ", " K "}; static const char *bp[] = {" ", " *P", " *N", " *B", " *R", " *A", " *C", " *M", " *Q", " *E", " *B", " *Q", - " *W", " *H", " *N", " *J", " *I", " *L", " *C", " *S", " *G", " *H", " *A", " *F", + " *W", " *H", " *N", " *D", " *H", " *L", " *C", " *S", " *G", " *H", " *A", " *F", " *E", " *H", " *M", " *S", " *E", " *W", " *O", " *G", " *V", " *S", " *E", " *A", " *K"}; static char *wsqr = "\033[7m"; static char *bsqr = "\033[0m"; @@ -658,11 +658,11 @@ static int style4(struct game_state_t *b, struct move_t *ml) static int style5(struct game_state_t *b, struct move_t *ml) { static const char *wp[] = {" ", " o ", " :N:", " ", " |R|", " (A)", " [C]", " :M:", " {Q}", " !E!", - " ", " {Q}", " .W.", " :H:", " :N:", " ", " |I|", " |L|", + " ", " {Q}", " .W.", " :H:", " :N:", " ", " |D|", " |L|", " |C|", " !S!", " :G:", " :H:", " {A}", " {F}", " !E!", " (H)", " [M]", " :S:", " !E!", " |W|", " *O*", " {G}", " :V:", " (S)", " [E]", " &A&", " =K="}; static const char *bp[] = {" ", " p ", " :n:", " ", " |r|", " (a)", " [c]", " :m:", " {q}", " !e!", - " ", " {q}", " .w.", " :h:", " :n:", " ", " |i|", " |l|", + " ", " {q}", " .w.", " :h:", " :n:", " ", " |d|", " |l|", " |c|", " !s!", " :g:", " :h:", " {a}", " {f}", " !e!", " (h)", " [m]", " :s:", " !e!", " |w|", " *o*", " {g}", " :v:", " (s)", " [e]", " &a&", " =k="}; static char *wsqr = ""; @@ -681,11 +681,11 @@ static int style5(struct game_state_t *b, struct move_t *ml) static int style6(struct game_state_t *b, struct move_t *ml) { static const char *wp[] = {" |", " wp |", " WN |", " WB |", " WR |", " WA |", " WC |", " WM |", " WQ |", - " WE |", " WB |", " WQ |", " WW |", " WH |", " WN |", " WJ |", " WI |", " WL |", + " WE |", " WB |", " WQ |", " WW |", " WH |", " WN |", " WD |", " WH |", " WL |", " WC |", " WS |", " WG |", " WH |", " WA |", " WF |", " WE |", " WH |", " WM |", " WS |", " WE |", " WW |", " WO |", " WG |", " WV |", " WS |", " WE |", " WA |", " WK |"}; static const char *bp[] = {" |", " bp |", " BN |", " BB |", " BR |", " BA |", " BC |", " BM |", " BQ |", - " BE |", " BB |", " BQ |", " BW |", " BH |", " BN |", " BJ |", " BI |", " BL |", + " BE |", " BB |", " BQ |", " BW |", " BH |", " BN |", " BD |", " BH |", " BL |", " BC |", " BS |", " BG |", " BH |", " BA |", " BF |", " BE |", " BH |", " BM |", " BS |", " BE |", " BW |", " BO |", " BG |", " BV |", " BS |", " BE |", " BA |", " BK |"}; static char *wsqr = ""; @@ -703,9 +703,9 @@ static int style6(struct game_state_t *b, struct move_t *ml) /* Miniature board */ static int style7(struct game_state_t *b, struct move_t *ml) { - static const char *wp[] = {" ", " P", " N", " B", " R", " A", " C", " M", " Q", " E", " B", " Q", " W", " H", " N", " J", " I", " L", + static const char *wp[] = {" ", " P", " N", " B", " R", " A", " C", " M", " Q", " E", " B", " Q", " W", " H", " N", " D", " H", " L", " C", " S", " G", " H", " A", " F", " E", " H", " M", " S", " E", " W", " O", " G", " V", " S", " E", " A", " K"}; - static const char *bp[] = {" -", " p", " n", " b", " r", " a", " c", " m", " q", " e", " b", " q", " w", " h", " n", " j", " i", " l", + static const char *bp[] = {" -", " p", " n", " b", " r", " a", " c", " m", " q", " e", " b", " q", " w", " h", " n", " d", " h", " l", " c", " s", " g", " h", " a", " f", " e", " h", " m", " s", " e", " w", " o", " g", " v", " s", " e", " a", " k"}; static char *wsqr = ""; static char *bsqr = "";