Polyglot -> Illegal move

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Polyglot -> Illegal move

Postby kinderchocolate » 19 Oct 2010, 15:05

I'm playing around Polyglot.

I have the code:

board_t board;
board_from_fen(&board, "4k3/4q3/8/8/8/8/8/4K3 w - - 1 2");
int myMove = move_make(square_make(4, 0), square_make(4, 1));
bool legal = move_is_legal(myMove, &board);

The position is: BQ: e7, BK: e8, WK: e1, white is under check and white to move. The line int myMove ... attempts to move the e1 king to e2 which is illegal. However, move_is_legal returns true....
kinderchocolate
 
Posts: 12
Joined: 14 Oct 2010, 11:05

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 16 guests