setTileFlag method

void setTileFlag({
  1. required Point<int> point,
  2. required int flag,
})

Set the given flag on the tile at the given point.

Implementation

void setTileFlag({
  required final Point<int> point,
  required final int flag,
}) {
  final map = tiles.putIfAbsent(point.x, () => {});
  final value = map.putIfAbsent(point.y, () => 0) | flag;
  map[point.y] = value;
}