Can you post your error log? Theres nothing wrong with getting help with your code, if you don't understand something then you don't understand something and you need help.
If you post your error log we will be able to narrow down your problem. It will give you a line where you are getting the nullpointerexception and that will give us a huge clue as to why your code is having problems.
Please only put your Java code inside the code tags. I'm finding it rather difficult to tell what's supposed to be code and what's supposed to be your descriptions of it.
Following the standard naming conventions would also help.
There is a lot of missing information in this code, for example, where is the manipulates class? Where is the arrayofobjects.rangomgenerator method? In the method you are showing what is gen1 and gen2?
When do you fill the static array? It's instantiated at the top but I don't see you filling it. Also, as stated above, follow standard naming conventions and post up the stack trace(error message) exactly(copy/paste it in code tags).
Edit: saw new post, try printing the game array and see what is produced.
Sunde's right -- you need to fill your array. In your GameBoard class you have:
You need to initialize each element of that array, like so:Code:
static Cell game= new Cell;
for(int i = 0; i < game.length; ++i)
game[i] = new Cell(pos, des, type);
Thanks guys problem solved. no more exceptions. Thanks You.:D