how do I randomize the position

generate = function() block = object x = 15 y = 15 end end cellSize = 15 init = function() hero = object x = 0 y = 0 height = cellSize width = cellSize color = "red" end justPressed = false generate() end

prevKeys = [LEFT=false, RIGHT=false, UP=false, DOWN=false]

update = function() if keyboard.LEFT and not prevKeys.LEFT and hero.x != cellSize * -5 then hero.x -= cellSize end prevKeys.LEFT = keyboard.LEFT

if keyboard.RIGHT and not prevKeys.RIGHT and hero.x != cellSize * 5 then hero.x += cellSize end prevKeys.RIGHT = keyboard.RIGHT

if keyboard.UP and not prevKeys.UP and hero.y != cellSize * 5 then hero.y += cellSize end prevKeys.UP = keyboard.UP

if keyboard.DOWN and not prevKeys.DOWN and hero.y != cellSize * -5 then hero.y -= cellSize end prevKeys.DOWN = keyboard.DOWN end

draw = function() screen.clear() for x = -5 to 5 for y = -5 to 5 screen.drawRect(xcellSize,ycellSize,cellSize,cellSize,"grey") end end screen.fillRect(block.x,block.y,15,15,"blue") screen.fillRect(hero.x,hero.y,hero.width,hero.height,hero.color) screen.setFont("digitalDisco") screen.drawText("score:",-100,80,20,"white") end


how do I randomize the block x y to fit the grid