View Single Post
  #2 (permalink)  
Old 11-05-2007, 09:17 AM
hiranya hiranya is offline
Member
 
Join Date: Jun 2007
Location: Colombo, Sri Lanka
Posts: 32
hiranya is on a distinguished road
Hi,
Your problem is not clear enough. We would be able to help if you can post some more specifics about the matter. Also please explain what this addCreeper() method does.

Code:
Cell creeper = new Cell(); cellArray[randomCell] = creeper.addCreeper();
If the adCreeper() is a void method then definitely the above is wrong. I also noticed that cellArray is an array of type int[]. Then you can't add creepers which are of type Cell to this array. You have to declare the cellArray as follows.
Code:
private Cell[] cellArray = new Cell[numCells];
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote