so one idea is to fully expand it first and then parse it.
Of course, you need to handle things like
e2e4 and Rad4 and so on.
I am also certain that if the first letter is not upper case then it is a pawn move(i.e. all the other moves must give the name of the piece that is moving)
so you could change e2e4 to Pe2e4 or Pe2Pe4
In reply to Re: Parsing Chess Algebra Notation
by podian
in thread Parsing Chess Algebra Notation
by cyocum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |