Class SimpleMemoryCell
java.lang.Object
dev.zemco.codegame.execution.memory.SimpleMemoryCell
- All Implemented Interfaces:
IMemoryCell
Simple
memory cell that does not hold any value from the start.- Author:
- Erik Zemčík
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SimpleMemoryCell
public SimpleMemoryCell()Creates an instance ofSimpleMemoryCellthat holds no value.
-
-
Method Details
-
hasValue
public boolean hasValue()Description copied from interface:IMemoryCellReturns if cell currently holds an integer value.- Specified by:
hasValuein interfaceIMemoryCell- Returns:
- true if currently holds value else false
-
getValue
public int getValue()Description copied from interface:IMemoryCellReturns currently held integer value of this cell.- Specified by:
getValuein interfaceIMemoryCell- Returns:
- currently held value
-
setValue
public void setValue(int value) Description copied from interface:IMemoryCellSets value held by the cell.- Specified by:
setValuein interfaceIMemoryCell- Parameters:
value- value to set
-