Author: Anthony Cozzie
Date: 12:52:42 06/11/04
Go up one level in this thread
On June 11, 2004 at 15:32:02, Russell Reagan wrote: >On June 11, 2004 at 08:04:35, Anthony Cozzie wrote: > >>And this is where we disagree. I claim coordinate notation is *not* simpler to >>parse than Long SAN. >> >>Coordinate parsing code in Zappa: >> >>m = m_build(0,0,0,(str[0] - 'a') + (str[1] - '1')*8, (str[2] - 'a') + (str[3] - >>'1')*8); >>/* fill in piece/cap/promote types */ >> >>Long SAN parsing code in Zappa: >>m = m_build(0,0,0,(str[1] - 'a') + (str[2] - '1')*8, (str[4] - 'a') + (str[5] - >>'1')*8); >>/* fill in piece/cap/promote types */ >> >>Discarding a + or # symbol is easy. > >This is a conversion from a string to your internal move representation, >correct? What about converting the internal move representation to a string? For >instance, here is a move representation that an engine could realistically use. > >typedef struct { > unsigned char from; > unsigned char to; > unsigned short promote; // contains piece to promote, or zero for none >} Move; > >Let's say I do this: > >Move move; >move->from = d4; >move->to = d5; >move->promote = 0; > >Using this representation, you should be able to convert any struct Move to a >coordinate notation string, having only the knowledge of this struct. The string >is 'd4d5'. > >Now I have a task for you. Since you claim that coordinate notation is just as >simple as long algebraic, tell me what the long algebraic string is, given the >same information. See my reply to Fabien. anthony
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.