# Suduko tester

**URL:** <https://forum.kirupa.com/t/suduko-tester/208841>\
**Category:** flash\
**Created:** [December 3, 2006, 12:13pm UTC](https://forum.kirupa.com/t/suduko-tester/208841 "2006-12-03T12:13:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![farsite](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@farsite](https://forum.kirupa.com/u/farsite)\
**Post date:** [December 3, 2006, 12:13pm UTC](https://forum.kirupa.com/t/suduko-tester/208841/1 "2006-12-03T12:13:33Z")

</div>

Hi,

I am trying to write a suduko game, at the moment I am trying to write a function that checks the completed puzzle to see if it is correct. this is what I have so far

```auto
function testPuzz(line) {
    var testLine:Array = new Array;
    for (j=0; j<9; j++){
        testLine.push(_root["block"+((j+1)+(line*9))].num);
        if (j==8){
            trace(testLine);
            testLine.sort(Array.NUMERIC)
            if (testLine == "1","2","3","4","5","6","7","8","9"){
                if (line!= 9){
                    trace ("line "+line+" : "+testLine);
                    trace("ok so far");
                    line+=1;
                    testPuzz(line);
                }
                
            }
        }
    }
}

```

I get the output “ok so far” even if the testLine array is not as stated in the IF statement

any ideas, I sure this must be something simple I am missing
