public class Connect4Model
{
Connect4Column [] columns; // Cannot find symbol
private int NUM_COLUMNS;
private int NUM_ROWS;
private int playerToGoNext = Connect4Column.RED_COUNTER; // cannot find symbol
Connect4Model(int numCols, int numRows); // Missing method body...Is this because I'm missing a curly braces just above
{
columns = new Connect4Column[NUM_COLUMNS];
for (int i = 0;i < NUM_COLUMNS;i++)
{
columns[i] = new Connect4Column(NUM_ROWS); //Cannot find Connect4Column symbol
}
}
int getNumCols()
{
return 0;
}
int getNumRows()
{
return 0;
}
int getNextPlayer()
{
return 0;
}
boolean go(int thisColumn)
{
return true;
}
int getCounter(int thisColumn, int thisRow)
{
return 0;
}
int getNumCounters(int thisColumn)
{
if(thisColumn >= 0 && thisColumn < NUM_COLUMNS)
{
return my_array[thisColumn]; /// Cannot find my symbol my_array[thisColumn]
}
else
{
return 0;
}
}
}
What I'm trying to do is that in the constructor, I will assign NUM_COLUMNS and NUM_ROWS to take the values of the input parameters, and then make the column objects. But I know that in order to make the objects, i need to make the array of these objects. But I don't know why these errors are appearing.