Grid

p5ex~ Grid

(To be filled)

Constructor

new Grid(xCount, yCount, neighborRange, loopAtEndOfScreen)

Source:
Parameters:
Name Type Description
xCount number
yCount number
neighborRange number
loopAtEndOfScreen boolean

Methods

getCell(x, y)

Returns the specified cell.
Source:
Parameters:
Name Type Description
x number X index.
y number Y index.

getCellIndex(cell)

Returns the x and y index of the given cell.
Source:
Parameters:
Name Type Description
cell

getRelativePositionCell(referenceCell, relX, relY, loopAtEndOfScreen)

(To be filled)
Source:
Parameters:
Name Type Description
referenceCell
relX number
relY number
loopAtEndOfScreen boolean