supporting FRC questions
Posted: 13 Sep 2006, 08:39
What do programmers need to add in order to support FRC?
I want to support both shredder-fen and x-fen.
steps to do:
1)change the move generator to generate FRC castling moves
2)change the make move to enable it to make FRC castling moves
3)change the make move to enable it to change information about castling rights correctly in FRC(
today I calculate future castling rights simply by
if (castle>0)
{
castle&=castle_mask[from]&castle_mask[to];
}
I will need to change it to something similiar to glaurung like
if (from==..,)||(from==...)||(from==...)||(to==...)||(to==...)||(to==...)
3)change the function that get fen to get shredder-fen and translate it to the board structure
4)change the function that get fen to get x-fen and to translate it to the board structure.
5)change the function that get moves to understand shredder moves and x fen moves(shredder moves are king take rook for castling)
Did I forget something?
known problem that I need to handle with xfen:
1)getting fen when there is a rook that moved between the rook that can castle and the king.
In this case xfen tell me that
"traditional castling tag will be replaced by the file letter of the involved R"
2)castling when the king move one square
In this case I probably need to understand only 0-0 or o-o as short castling and 0-0-0 or o-o-o as long castling.
In supporting shredder-fen I need to have #if defined(FRC) only in the function that give the moves output(understanding does not need to have it because I can change my code to understand both FRC notation of shredder FEN and FRC notation of X-FEN)
Am I right?
Did I forget something?
Uri
I want to support both shredder-fen and x-fen.
steps to do:
1)change the move generator to generate FRC castling moves
2)change the make move to enable it to make FRC castling moves
3)change the make move to enable it to change information about castling rights correctly in FRC(
today I calculate future castling rights simply by
if (castle>0)
{
castle&=castle_mask[from]&castle_mask[to];
}
I will need to change it to something similiar to glaurung like
if (from==..,)||(from==...)||(from==...)||(to==...)||(to==...)||(to==...)
3)change the function that get fen to get shredder-fen and translate it to the board structure
4)change the function that get fen to get x-fen and to translate it to the board structure.
5)change the function that get moves to understand shredder moves and x fen moves(shredder moves are king take rook for castling)
Did I forget something?
known problem that I need to handle with xfen:
1)getting fen when there is a rook that moved between the rook that can castle and the king.
In this case xfen tell me that
"traditional castling tag will be replaced by the file letter of the involved R"
2)castling when the king move one square
In this case I probably need to understand only 0-0 or o-o as short castling and 0-0-0 or o-o-o as long castling.
In supporting shredder-fen I need to have #if defined(FRC) only in the function that give the moves output(understanding does not need to have it because I can change my code to understand both FRC notation of shredder FEN and FRC notation of X-FEN)
Am I right?
Did I forget something?
Uri