Grid
constructor(width: Int, height: Int, initWithDatalessTiles: Boolean = false, isWeighted: Boolean = false)
Parameters
width
The width of the grid (number of columns).
height
The height of the grid (number of rows).
init With Dataless Tiles
If true, initializes the grid with empty tiles.
is Weighted
Indicates whether the grid uses weighted or unweighted edges.
constructor(stringGrid: List<String>)
Construct the grid from a list of strings, where each string represents a row in the grid.
Sets the grid height to the list size and the width to the length of the first string. Requires that all strings have the same length. If some cells should be deleted, deleteNodeAtXY(x,y) or deleteNodesWithData(data) can be used after the grid is created.
Parameters
string Grid
A list of strings representing the grid