Documentation for SquareGridWGMap

class WGLib.SquareGridWGMap

Extends :class:WGMap class for maps on a rectangular grid

addBorderToCoordinate(fromID, toRow, toCol)
Add a border between fromID and the continent at toRow,toCol
addSquareBorders()

Adds borders for a grid created by createTerritories. All arguments are ints. (incomplete)

Warning

This function does not work yet.

connectSeperateGroups(territoryID=None)
Find territory groups that are not connected, and join them up. Assumes territories adjacent on the map can share a border.
createBlockContinents(bonus)

Creates continents of every 2x2 block.

Args:
self.rows,self.cols (int): The number of rows/columns of territories.
createTerritories(xOrigin=10, yOrigin=10, xOffset=20, yOffset=20)
Args:
rows,cols (int): The number of rows/columns of territories. xOrigin,yOrigin (int): The position of the upper left grid box. xOffset,yOffset (int): The width of the grid boxes.
getTerritoryName(row, col)
Calculate the territory name from arguments

Previous topic

Documentation for WGMap

Next topic

Documentation for MazeWGMap