Bridges-Python-3.0.2  3.0.2
Bridges(PythonAPI)
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
bridges.grid.Grid Class Reference
Inheritance diagram for bridges.grid.Grid:
bridges.color_grid.ColorGrid bridges.game_grid.GameGrid

Public Member Functions

def get_data_structure_type (self)
 Get the data structure type. More...
 
def __init__ (self, kwargs)
 Grid constructor. More...
 
def dimensions (self)
 Getter for the dimensions of the grid. More...
 
def get
 Get the row,col element in the grid. More...
 
def set
 set the (row, col) element in the grid More...
 

Public Attributes

 grid
 

Static Public Attributes

list grid_size = [10, 10]
 
list maxGridSize = [1080, 1920]
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.grid.Grid.__init__ (   self,
  kwargs,
  None 
)

Grid constructor.

Parameters
sizesize of the grid as array
rowsnumber of rows in grid
colsnumber of the columns in grid
Returns
None
Exceptions
ValueErrorif the size dimensions are greater than the max grid sizes (1080, 1920)

Member Function Documentation

◆ 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
rowrow position
colcolumn position
valvalue to be set in (row, col) position
Returns
None
Exceptions
Exceptionif setting the element at the row and column is a problem

Member Data Documentation

◆ grid

bridges.grid.Grid.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: