Javascript sudoku player