How to program rows in TicTacToe in java?
I'm writing a code for TicTacToe and I need to complete this class for the main program. This class deals with the rows and there is a little missing. Could someone please help me complete the missing part, I hope the other parts are correct.

    class Rows { 

    // computes an array "rows" of length r, each element an array "line" of 
    // length k, whose elements are arrays of length 2: array line represents a 
    // "row" of an m x n field, and array rows collects precisely all these 
    // lines; for efficient array-allocation (upfront) the precise number r of 
    // rows must also be given: 
    
    public static int[][][] list_rows(final int k, final int m, final int n, final int r) { 
        assert(k >= 2); 
        assert(m >= 1); 
        assert(n >= 1); 
        assert(k <= m || k <= n); 
        assert(r >= 1); int[][][] rows = new int[r][][]; 
        int row_index = 0;
    // I need to complete this!   
        assert(row_index == r); 
        return rows; 
    } 
    public static boolean check_list_rows(final int[][][] lr, final int[][] field) { 
        if (lr == null) return false; 
        final int R = lr.length; 
        if (R == 0) return false; 
        if (lr[0] == null) return false; 
        final int K = lr[0].length; 
        if (K == 0) return false; 
        for (int r = 0; r < R; ++r) { 
            if (lr[r] == null) return false; 
            if (lr[r].length != K) return false; 
            for (int p = 0; p < K; ++p) { 
                if (lr[r][p] == null) return false; 
                if (lr[r][p].length != 2) return false; 
                if (! Field.valid_coordinates(field, lr[r][p][0]+1, lr[r][p][1]+1)) return false; 
            } 
        } 
        return true; 
    } 
    public static void main(final String[] args) { 
        final int K = Integer.parseInt(args[0]);
        final int M = Integer.parseInt(args[1]);
        final int N = Integer.parseInt(args[2]); 
        final int R = Counting.number_rows(K,M,N); 
        final int[][][] rows = list_rows(K,M,N,R); 
        for (int r = 0; r < R; ++r) { 
            System.out.print(r + ": "); 
            for (int p = 0; p < K; ++p) 
                System.out.print("(" + rows[r][p][0] + "," + rows[r][p][1] + ")"); 
            System.out.println(); 
        } 
    } 
    } 

I cannot use the imported classes in Java, this has got to be written in simple basic jade code. 

I hope someone can help.

Thanks
How to program rows in TicTacToe in java?
===

I'm writing a code for TicTacToe and I need to complete this class for the main program. This class deals with the rows and there is a little missing. Could someone please help me complete the missing part, I hope the other parts are correct.

    class Rows { 

    // computes an array "rows" of length r, each element an array "line" of 
    // length k, whose elements are arrays of length 2: array line represents a 
    // "row" of an m x n field, and array rows collects precisely all these 
    // lines; for efficient array-allocation (upfront) the precise number r of 
    // rows must also be given: 
    
    public static int[][][] list_rows(final int k, final int m, final int n, final int r) { 
        assert(k >= 2); 
        assert(m >= 1); 
        assert(n >= 1); 
        assert(k <= m || k <= n); 
        assert(r >= 1); int[][][] rows = new int[r][][]; 
        int row_index = 0;
    // I need to complete this!   
        assert(row_index == r); 
        return rows; 
    } 
    public static boolean check_list_rows(final int[][][] lr, final int[][] field) { 
        if (lr == null) return false; 
        final int R = lr.length; 
        if (R == 0) return false; 
        if (lr[0] == null) return false; 
        final int K = lr[0].length; 
        if (K == 0) return false; 
        for (int r = 0; r < R; ++r) { 
            if (lr[r] == null) return false; 
            if (lr[r].length != K) return false; 
            for (int p = 0; p < K; ++p) { 
                if (lr[r][p] == null) return false; 
                if (lr[r][p].length != 2) return false; 
                if (! Field.valid_coordinates(field, lr[r][p][0]+1, lr[r][p][1]+1)) return false; 
            } 
        } 
        return true; 
    } 
    public static void main(final String[] args) { 
        final int K = Integer.parseInt(args[0]);
        final int M = Integer.parseInt(args[1]);
        final int N = Integer.parseInt(args[2]); 
        final int R = Counting.number_rows(K,M,N); 
        final int[][][] rows = list_rows(K,M,N,R); 
        for (int r = 0; r < R; ++r) { 
            System.out.print(r + ": "); 
            for (int p = 0; p < K; ++p) 
                System.out.print("(" + rows[r][p][0] + "," + rows[r][p][1] + ")"); 
            System.out.println(); 
        } 
    } 
    } 

I cannot use the imported classes in Java, this has got to be written in simple basic jade code. 

I hope someone can help.

Thanks