Corona SDK 2D Grid Arrows

Hi. Does anyone know an easy way to add arrows to a cell for a Corona SDK 2D Grid?

I want to be able to put directional arrows (up, down, left and right) when a user taps a cell.

However, if there is a cell that has an item beside it, I want it so that the arrow doesn’t display or be removed.

I recommend some tile dection like if image a tic toe board and you are in the middle thier is an other on the left
so
local tile= {}
local rowNum=3
local colNum=3
local posCol = 2
local posRow = 2
tile[1]= {}
tile[2]= {}
tile[3]= {}
tile[1][1]= 0
tile[1][2]= 0
tile[1][3]= 0
tile[2][1]= 1 --blocking path
tile[2][2]= 2 --player
tile[2][3]= 0
tile[3][1]= 0
tile[3][2]= 0
tile[3][3]= 0
local canLeft= false
local canRight= false
local canUp= false
local canDown= false
local function updateBoard ()
if posCol-1 == 0 or tile[posRow][posCol-1] == 1 then – left
canLeft= false
else
canLeft = true
end
if posCol+1 == colNum or tile[posRow][posCol+1] == 1 then – right
canRight= false
else
canRight = true
end
if posRow-1 == 0 or tile[posRow-1][posCol] == 1 then – Up
canUp= false
else
canUp = true
end
if posRow+1 == colNum or tile[posRow+1][posCol] == 1 then – Down
canDown= false
else
canDown = true
end
end
updateBoard()

You can use collision decision or vectors to find this out but I heard grid and this is very performance friendly

I recommend some tile dection like if image a tic toe board and you are in the middle thier is an other on the left
so
local tile= {}
local rowNum=3
local colNum=3
local posCol = 2
local posRow = 2
tile[1]= {}
tile[2]= {}
tile[3]= {}
tile[1][1]= 0
tile[1][2]= 0
tile[1][3]= 0
tile[2][1]= 1 --blocking path
tile[2][2]= 2 --player
tile[2][3]= 0
tile[3][1]= 0
tile[3][2]= 0
tile[3][3]= 0
local canLeft= false
local canRight= false
local canUp= false
local canDown= false
local function updateBoard ()
if posCol-1 == 0 or tile[posRow][posCol-1] == 1 then – left
canLeft= false
else
canLeft = true
end
if posCol+1 == colNum or tile[posRow][posCol+1] == 1 then – right
canRight= false
else
canRight = true
end
if posRow-1 == 0 or tile[posRow-1][posCol] == 1 then – Up
canUp= false
else
canUp = true
end
if posRow+1 == colNum or tile[posRow+1][posCol] == 1 then – Down
canDown= false
else
canDown = true
end
end
updateBoard()

You can use collision decision or vectors to find this out but I heard grid and this is very performance friendly