update: i is the x and y is the y value of the dots. how would i add the i and y to the current x and y of the dot?
pacDots[i][y]; is what i have but this doesn't fill in the array...
If can show some more code or, even better a runnable snippet, will be a lot easier to get help.
In general, if the array is going to have variable size (length), we better use an ArrayList(). Or you can just set the eaten dots to null. I would go for an ArrayList though.
I can't really understand the question about array's population.
Are you using class? Perhaps it could make things a lot easier.
Answers
update: i is the x and y is the y value of the dots. how would i add the i and y to the current x and y of the dot? pacDots[i][y]; is what i have but this doesn't fill in the array...
If can show some more code or, even better a runnable snippet, will be a lot easier to get help.
In general, if the array is going to have variable size (length), we better use an ArrayList(). Or you can just set the eaten dots to
null
. I would go for an ArrayList though.I can't really understand the question about array's population.
Are you using class? Perhaps it could make things a lot easier.
Here an article that might help you:
http://forum.processing.org/two/discussion/8081/from-several-arrays-to-classes
http://forum.processing.org/two/discussion/11156/pac-man-game-not-completed-asking-for-assistance#latest