Utils.addToGrid()

   
Type function
Library wattageTileEngine.Utils.*
Return value VOID
Keywords  
See also  

Overview

This function adds a value to a grid at the specified row and column.

Syntax

Utils.addToGrid( value, grid, row, column )
value (required)

Value. The value to store at the row and column in the grid.

grid (required)

Table. The table in which the value will be inserted.

row (required)

Number. The row to insert the value in.

column (required)

Number. The column to insert the value in.

Examples

local TileEngine = require 'plugin.wattageTileEngine'
local Utils = TileEngine.Utils

local grid = {}
Utils.addToGrid("value at (10, 15)", grid, 10, 15)