board[i][j] = EMPTY;
}
}
ArrayList<Point2I> l = new ArrayList<Point2I>(width * height);
l.add(new Point2I(x1, y1));
while(!l.isEmpty())
{
Point2I p1 = l.remove(l.size() - 1);
for(Directions d: Directions.N8)
{
Point2I p2 = new Point2I(p1.x+d.dx(), p1.y+d.dy());
if (!mb.contains(p2.x, p2.y) || board[p2.x][p2.y] != EMPTY)
continue;
board[p2.x][p2.y] = COLOR;
l.add(p2);