◆ __init__()
def bridges.grid.Grid.__init__ |
( |
|
self, |
|
|
|
kwargs, |
|
|
|
None |
|
) |
| |
Grid constructor.
- Parameters
-
size | size of the grid as array |
rows | number of rows in grid |
cols | number of the columns in grid |
- Returns
-
None
- Exceptions
-
ValueError | if the size dimensions are greater than the max grid sizes (1080, 1920) |
◆ dimensions()
def bridges.grid.Grid.dimensions |
( |
|
self, |
|
|
|
list |
|
) |
| |
Getter for the dimensions of the grid.
- Returns
-
list as the dimensions of the grid
◆ get()
def bridges.grid.Grid.get |
( |
|
self, |
|
|
|
row |
|
) |
| |
Get the row,col element in the grid.
(int) row: row the element is in (int) col: col the element is in
- Returns
-
element
-
none
-
Raises
-
Exception printing the traceback stack if returning the row and column is an error
◆ get_data_structure_type()
def bridges.grid.Grid.get_data_structure_type |
( |
|
self, |
|
|
|
str |
|
) |
| |
Get the data structure type.
- Returns
-
str representing the data structure type
◆ set()
def bridges.grid.Grid.set |
( |
|
self, |
|
|
|
row |
|
) |
| |
set the (row, col) element in the grid
- Parameters
-
row | row position |
col | column position |
val | value to be set in (row, col) position |
- Returns
-
None
- Exceptions
-
Exception | if setting the element at the row and column is a problem |
◆ grid
◆ grid_size
list bridges.grid.Grid.grid_size = [10, 10] |
|
static |
◆ maxGridSize
list bridges.grid.Grid.maxGridSize = [1080, 1920] |
|
static |
The documentation for this class was generated from the following file:
- /home/erik/work/bridges/bridges-python/bridges/grid.py