Commit 4723fd2e authored by Artefact2's avatar Artefact2

Support long short algebraic notation, ie Nc7d5

parent 1870e022
......@@ -24,7 +24,11 @@ static cch_square_t cch_find_piece(const cch_board_t* b, cch_pure_piece_t type,
cch_square_t sq_start = offset, sq_stop = 64, sq_increment = 1;
cch_move_t cm = (cch_move_t){ .end = m->end, .promote = m->promote };
if(~m->start & 128) {
if((m->start & 192) == 0) {
if(m->start < sq_start || m->start >= sq_stop) return 255;
sq_start = m->start;
sq_stop = sq_start + 1;
} else if(~m->start & 128) {
cch_square_t file = m->start & 56;
if(sq_start < file) {
sq_start = file;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment