hasObjectId method

bool hasObjectId(
  1. String id
)

Returns whether this inventory has an object with the specified id.

Implementation

bool hasObjectId(String id) {
  for (EscapeGameObject object in _objects) {
    if (object.id == id) {
      return true;
    }
  }
  return false;
}