Skip to main content
added 46 characters in body
Source Link

I have this data

enter image description here

As you can see there's a 2nd board there.

Now what i want is something like this

PSEUDO CODE

If the first boards table[1,1] is not NULL then I will need to find out now if table[0,1] and table[0,0] has the same length as table[1,1] and table[1,0]

then display in the 2nd board a blue circle if it is the same in length if not red circle

But if the table[1,1] is NULL then I need to know compare 1st column and 2nd column if they have the same length

then display in the 2nd board a blue circle if it is the same in length if not red circle

If the first boards table[1,1] is not `NULL` then I will need to find out 
now if table[0,1] and table[0,0] has the same length as table[1,1] and 
table[1,0]

then display in the 2nd board a blue circle if it is the same in length if 
not red circle

But if the table[1,1] is `NULL` then I need to know compare 1st column and 
2nd column if they have the same length

then display in the 2nd board a blue circle if it is the same in length if 
not red circle

#END PSEUDO CODE

I tried doing the following

//COLUMN
    for(int col = 0; col < table.GetLength(0); col++)
    {
        int sum = 0;
        //ROW
        for (int row = 0; row < table.GetLength(1); row++)
        {
            if (table[col, row] != null)
            {
                Debug.Log("Column 1 has this value : " + table[col, row]);
            } 
        }
        //Debug.Log("table column: " + col + " has " + sum + " data");
    }

For now I can only get the whole Row and Column but I don't know how to do that pseudo code.

I have this data

enter image description here

As you can see there's a 2nd board there.

Now what i want is something like this

PSEUDO CODE

If the first boards table[1,1] is not NULL then I will need to find out now if table[0,1] and table[0,0] has the same length as table[1,1] and table[1,0]

then display in the 2nd board a blue circle if it is the same in length if not red circle

But if the table[1,1] is NULL then I need to know compare 1st column and 2nd column if they have the same length

then display in the 2nd board a blue circle if it is the same in length if not red circle

#END PSEUDO CODE

I tried doing the following

//COLUMN
    for(int col = 0; col < table.GetLength(0); col++)
    {
        int sum = 0;
        //ROW
        for (int row = 0; row < table.GetLength(1); row++)
        {
            if (table[col, row] != null)
            {
                Debug.Log("Column 1 has this value : " + table[col, row]);
            } 
        }
        //Debug.Log("table column: " + col + " has " + sum + " data");
    }

For now I can only get the whole Row and Column but I don't know how to do that pseudo code.

I have this data

enter image description here

As you can see there's a 2nd board there.

Now what i want is something like this

PSEUDO CODE

If the first boards table[1,1] is not `NULL` then I will need to find out 
now if table[0,1] and table[0,0] has the same length as table[1,1] and 
table[1,0]

then display in the 2nd board a blue circle if it is the same in length if 
not red circle

But if the table[1,1] is `NULL` then I need to know compare 1st column and 
2nd column if they have the same length

then display in the 2nd board a blue circle if it is the same in length if 
not red circle

#END PSEUDO CODE

I tried doing the following

//COLUMN
    for(int col = 0; col < table.GetLength(0); col++)
    {
        int sum = 0;
        //ROW
        for (int row = 0; row < table.GetLength(1); row++)
        {
            if (table[col, row] != null)
            {
                Debug.Log("Column 1 has this value : " + table[col, row]);
            } 
        }
        //Debug.Log("table column: " + col + " has " + sum + " data");
    }

For now I can only get the whole Row and Column but I don't know how to do that pseudo code.

Source Link

Loop through multidimensional array in C#(Unity)

I have this data

enter image description here

As you can see there's a 2nd board there.

Now what i want is something like this

PSEUDO CODE

If the first boards table[1,1] is not NULL then I will need to find out now if table[0,1] and table[0,0] has the same length as table[1,1] and table[1,0]

then display in the 2nd board a blue circle if it is the same in length if not red circle

But if the table[1,1] is NULL then I need to know compare 1st column and 2nd column if they have the same length

then display in the 2nd board a blue circle if it is the same in length if not red circle

#END PSEUDO CODE

I tried doing the following

//COLUMN
    for(int col = 0; col < table.GetLength(0); col++)
    {
        int sum = 0;
        //ROW
        for (int row = 0; row < table.GetLength(1); row++)
        {
            if (table[col, row] != null)
            {
                Debug.Log("Column 1 has this value : " + table[col, row]);
            } 
        }
        //Debug.Log("table column: " + col + " has " + sum + " data");
    }

For now I can only get the whole Row and Column but I don't know how to do that pseudo code.