Download or view numberCheckerboard.frink in plain text format
g = new graphics
rows = 9
cols = 12
g.color[0,0,0]
freeCells = new array
for row = 0 to rows
for col = 0 to cols
{
if (row + col) mod 2 == 0
g.fillRectSize[col, row, 1, 1]
else
freeCells.push[[row,col]]
}
num = 1
g.font["SansSerif", .75]
while (length[freeCells] > 0)
{
[row, col] = freeCells.removeRandom[]
g.text[num, col + 1/2, row + 1/2]
num = num + 1
}
//g.show[]
//g.print[]
Download or view numberCheckerboard.frink in plain text format
This is a program written in the programming language Frink.
For more information, view the Frink
Documentation or see More Sample Frink Programs.
Alan Eliasen was born 20218 days, 0 hours, 1 minutes ago.