This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:floodfillterrain [2022/11/05 13:22] – MaxSize definition clarified Karsten75 | 4rpl:commands:floodfillterrain [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 18: | Line 18: | ||
FloodFillTerrain(GetUnitCell(self) 1 20 999999) -> | FloodFillTerrain(GetUnitCell(self) 1 20 999999) -> | ||
</ | </ | ||
+ | |||
+ | ==== How FloodFill Works ==== | ||
+ | |||
+ | FloodFill starts at the center and looks at the four adjacent cells - above, left, right, below. If the cell matches the criteria, it is added to a list. | ||
+ | |||
+ | Now FloodFill iterates over each of the cells in the list, but not checking cells that has been checked in a previous iteration. So, assuming the cell " | ||
+ | |||
+ | This process iterates for as many iterations as " | ||
+ | |||
< | < | ||