move method

bool move(
  1. String name,
  2. List<int> arg
)

If the name of the move is in the _directions map, call the function associated with that name

Args: name (String): The name of the direction to move in. arg (List): The argument list for the move function.

Returns: A boolean value.

Implementation

bool move(String name, List<int> arg) {
  if (_directions.containsKey(name)) {
    return _callMoveFunction(name, arg);
  }

  return false;
}