Class: MemoryCell

MemoryCell(value, font)

Class representing a cell of memory of the program execution.

Constructor

new MemoryCell(value, font)

Constructor for a new MemoryCell object.
Parameters:
Name Type Description
value int Initial value for the cell
font Font Font for drawing the value
Source:

Methods

addCube()

Creates a cube mesh and adds it to the cell for it to be updated and drawn later.
Source:

addText(font)

Create a text mesh for drawing the value of the cell and adds it in the scene.
Parameters:
Name Type Description
font Font The font previously loaded for drawing the cell value
Source:

draw(idx, currentCellIdx, font)

Draw the cell in the scene with the corresponding coordinates according to the cell index and the current pointer index.
Parameters:
Name Type Description
idx int Index of the cell
currentCellIdx int Index of the current pointer
font Font Font to draw the cell value
Source: