add prpieces(): print position White & Black pieces list

This commit is contained in:
2021-11-16 21:46:22 +01:00
parent bf520b6c71
commit da0ee468e0

View File

@@ -54,6 +54,7 @@ int do_pos(pos_t *, char*);
int do_genmoves(pos_t *, char*); int do_genmoves(pos_t *, char*);
int do_prmoves(pos_t *, char*); int do_prmoves(pos_t *, char*);
int do_prmovepos(pos_t *pos, char *arg); int do_prmovepos(pos_t *pos, char *arg);
int do_prpieces(pos_t *pos, char *arg);
int do_memstats(pos_t *, char*); int do_memstats(pos_t *, char*);
int do_eval(pos_t *, char*); int do_eval(pos_t *, char*);
int do_quit(pos_t *, char*); int do_quit(pos_t *, char*);
@@ -68,6 +69,7 @@ COMMAND commands[] = {
{ "genmove", do_genmoves, "Generate next move list" }, { "genmove", do_genmoves, "Generate next move list" },
{ "prmoves", do_prmoves, "Print position move list" }, { "prmoves", do_prmoves, "Print position move list" },
{ "prmovepos", do_prmovepos, "Print Nth move resulting position" }, { "prmovepos", do_prmovepos, "Print Nth move resulting position" },
{ "prpieces", do_prpieces, "Print Pieces (from pieces lists)" },
{ "memstats", do_memstats, "Generate next move list" }, { "memstats", do_memstats, "Generate next move list" },
{ "eval", do_eval, "Eval current position" }, { "eval", do_eval, "Eval current position" },
{ "debug", do_debug, "Set log level to LEVEL" }, { "debug", do_debug, "Set log level to LEVEL" },
@@ -306,6 +308,13 @@ int do_prmovepos(pos_t *pos, char *arg)
return 1; return 1;
} }
int do_prpieces(pos_t *pos, __attribute__((unused)) char *arg)
{
log_f(1, "%s\n", arg);
pos_pieces_print(pos);
return 1;
}
int do_memstats(__attribute__((unused)) pos_t *pos, int do_memstats(__attribute__((unused)) pos_t *pos,
__attribute__((unused)) char *arg) __attribute__((unused)) char *arg)
{ {