parseMoveList function
Implementation
MoveList parseMoveList(ChessGameState startingState, List<String> moveList) {
List<ChessMove> moves = [];
ChessGameState state = startingState;
for (String moveString in moveList) {
ChessMove m = parseMoveString(moveString, state);
state = state.playMove(m);
moves.add(m);
}
return MoveList(state, moves);
}