indexCenterPoint

fun indexCenterPoint(row: Int, column: Int): Point

Gives center for a position (row, column). Example, item at index 0 is referenced by (0,0) or 6 by (1,2).

Return

centre point of the specified point

Parameters

row

the row position for the inventory item (0-7)

column

the column position for the inventory item. (0-3)

Throws

if x is not between 0 to 3 or y is not between 0 to 6

fun indexCenterPoint(index: Int): Point

Finds the center point of the inventory's index

Return

indexCenterPoint of the index param

Parameters

index

0-(Constants.INVENTORY_SIZE-1), index of inventory

Throws

if index is below 0 or above (Constants.INVENTORY_SIZE-1)