I'm trying to create a grid of cells for a cellular automata in processing, but I get an error message telling me it was expecting SEMI and it found cell is there anything else I can do?
for (int i = 0; i < 12960; i = i+1)
{
x = x+100;
if (x > width)
{
y = y+100;
x = 0;
}
cell cell[i] = new cell(x, y);
I would expect the result of this to create 12960 objects that each have the name cell[x] where x is an integer from 0 to 12960. However, I get an error message reading:
expecting SEMI, found 'cell' Syntax error, maybe a missing semicolon?
is there any way to get a result like the one I want with a different method?
this is not related to the name of the object being the same as the class as I have tried it with a different name.