parseToContainer function

List<SimpleContainer> parseToContainer(
  1. String command,
  2. String languageCode
)

Implementation

List<SimpleContainer> parseToContainer(String command, String languageCode) {
  final List<String> splited = splitCommand(command);
  if (splited.first == "go") {
    return _parseGo(splited, languageCode);
  } else if (splited.first == "paint") {
    return _parsePaint(splited, languageCode);
  } else if (splited.first == "fill_empty") {
    return _parseFillEmpty(splited, languageCode);
  } else if (splited.first == "copy") {
    return _parseCopy(splited, languageCode);
  } else if (splited.first == "mirror") {
    return _parseMirror(splited, languageCode);
  }

  return <SimpleContainer>[];
}