mirrorCommands method
It creates a new command caller, copies the board from the old command caller, parses the commands, mirrors the board, and then joins the crosses from the new board to the old board.
Args:
commands (List
Implementation
void mirrorCommands(List<String> commands, String direction) {
final CommandCaller newCaller = CommandCaller(shape);
final CommandCaller oldCaller = _commandCaller;
_commandCaller = newCaller;
_commandCaller.board.move.toPosition(
oldCaller.board.move.row,
oldCaller.board.move.column,
);
_parse(commands.join(","), false);
mirrorBoard(direction);
oldCaller.board.joinBoards(_commandCaller.board.getCross);
_commandCaller = oldCaller;
}