Define the WormTiles class containing tile related functions.
More...
Static Public Member Functions |
static function | SafeAddSquare (list, tile, radius) |
| Add a square area to an AITileList containing tiles that are within radius tiles from the center tile, taking the edges of the map into account.
|
static function | SafeAddRectangle (tile_list, center_tile, x_min, y_min, x_plus, y_plus) |
| A safe implementation of AITileList.AddRectangle.
|
Detailed Description
Define the WormTiles class containing tile related functions.
Member Function Documentation
function WormTiles::SafeAddRectangle |
( |
tile_list |
, |
|
|
center_tile |
, |
|
|
x_min |
, |
|
|
y_min |
, |
|
|
x_plus |
, |
|
|
y_plus |
|
|
) |
| |
|
static |
A safe implementation of AITileList.AddRectangle.
Only valid tiles are added to the tile list.
- Note
- Taken from AdmiralAI.
- Parameters
-
tile_list | The AITileList to add the tiles to. |
center_tile | The center of the rectangle. |
x_min | The amount of tiles to the north-east, relative to center_tile. |
y_min | The amount of tiles to the north-west, relative to center_tile. |
x_plus | The amount of tiles to the south-west, relative to center_tile. |
y_plus | The amount of tiles to the south-east, relative to center_tile. |
function WormTiles::SafeAddSquare |
( |
list |
, |
|
|
tile |
, |
|
|
radius |
|
|
) |
| |
|
static |
Add a square area to an AITileList containing tiles that are within radius tiles from the center tile, taking the edges of the map into account.
- Note
- This function was taken from Rondje. Name was changed from SafeAddRectangle to SafeAddSquare.
- Parameters
-
list | The AITileList in which the valid tiles will be returned. |
tile | The center tile. |
radius | The radius of tiles. |
The documentation for this class was generated from the following file: