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[]