goCell method

void goCell(
  1. String cell
)

Implementation

void goCell(String cell) {
  bool call = true;
  if (cell.length == 2 &&
      _rows.containsKey(cell[0]) &&
      _columns.containsKey(cell[1])) {
    call = _commandCaller.move(
      "toPosition",
      <int>[_rows[cell[0]]!, _columns[cell[1]]!],
    );
  } else {
    _error = CatError.invalidCell;

    return;
  }
  if (!call) {
    _error = CatError.invalidMove;

    return;
  }
  _error = CatError.none;
}