I am trying to build a sudoku board and I have a bit of trouble. I was wondering if anyone could help me with this: I know this has a simple answer but I can’t figure it out.
I have an array that is built and it should have a series of numbers placed in it. I can get the numbers for the whole row to go into each single box for a row (ex. row 1, box 1 = 1,2,3,4,5,6,7,8,9 ; row 2 box 2 = 1,2,3,4,5,6,7,8,9 , etc.)
Here is my code
var num = 0;
var gridx = 50;
var gridy = 50;
// arrays
bb = [];
var easy1:Array = new Array();
easy1 = [["", "1", "", "9", "", "4", "", "6", "5"],
["5", "", "", "", "", "6", "", "", ""],
["", "", "", "", "7", "5", "1", "", "4"],
["", "", "", "8", "", "", "", "2", "6"],
["", "7", "", "", "", "", "", "5", ""],
["2", "4", "", "", "", "1", "", "", ""],
["7", "", "9", "6", "5", "", "", "", ""],
["", "", "", "8", "", "", "", "", "2"],
["8", "1", "", "4", "", "3", "", "6", ""]];
/////////////////////////////////////////////////////// loops
for (i=0; i<9; i++) {
for (j=0; j<9; j++) {
//////////////////////////////////////////////////
bb[j] = bx.duplicateMovieClip("bx"+num, num);
bb[j]._y = gridx*i+0;
bb[j]._x = gridy*j+0;
num++;
//
bb[j].dayT = easy1*;
}
}
//
any help at all would be great. Thank you.