2015-03-15 04:52:18 -04:00
|
|
|
function shallowTablePrint(t)
|
|
|
|
|
for i, v in pairs(t) do
|
|
|
|
|
print(i, v)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function printMatrix(matrix)
|
|
|
|
|
for i, v in ipairs(matrix) do
|
|
|
|
|
for j, w in ipairs(v) do
|
|
|
|
|
if not w then io.write("o ") else io.write("x ") end
|
|
|
|
|
end
|
|
|
|
|
io.write("\n")
|
|
|
|
|
end
|
2015-03-15 05:26:47 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function randomPosition()
|
|
|
|
|
print("hfhfhhdh")
|
|
|
|
|
return math.random(1, gridWidth), math.random(1, gridHeight)
|
2015-03-15 04:52:18 -04:00
|
|
|
end
|