hasVerticalCollision method

bool hasVerticalCollision(
  1. int x,
  2. int y
)

Implementation

bool hasVerticalCollision(int x, int y) {
  if (x >= this.width()) {
    return false;
  }
  return this.s.asMap().entries.any((data) {
    var index = data.key;
    var row = data.value;
    return index >= y && x < row.length && row[x] != null;
  });
}