Question: void parseNotationString(char* str, Move* irmaMove); Description : This function receives an algebraic notation string, str, and one Move struct pointer. The function must parse str
void parseNotationString(char* str, Move* irmaMove);
Description: This function receives an algebraic notation string, str, and one Move struct pointer. The function must parse str and extract information about Irma moves encoded there, and populate all corresponding fields in the struct pointed to by irmaMove.
At the very least, it will always be possible to set the from_loc, current_loc, to_loc, and irma.ws, irma.wg fields in Irma struct. It is necessary to denote which column and/or row the Irmas move is coming from, and also the column and/or row in a moves to_loc field which determine where Irma ends. To initialize from_loc, current_loc, to_loc fields, you must initialize that moves from/current/to_loc.col fields to x to indicate that the column is currently unknown. Similarly, the moves from/current/to_loc.row coordinate must be initialized to -1.
After initialization, update from_loc, current_loc, to_loc, and irma.ws, irma.wg fields through extracting information from given algebraic notation string.
Output: This function should not print anything to the screen.
Return Value: There is no return value. This is a void function.
This would be in C programming code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
