This site requires JavaScript, please enable it in your browser!
Greenfoot back
henrYoda
henrYoda wrote ...

2013/5/15

Randomly generated dungeon

1
2
3
4
5
henrYoda henrYoda

2013/5/19

#
still not working...
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
can you post the code for the World class?
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
is it still giving you the "Cannot find symbol- constructor World()" error or is this a new error?
henrYoda henrYoda

2013/5/19

#
it is saying: Cannot find symbol - constructor World(int, int)
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
in your world class what is in the space where i've put isthereanythinghere? public World(isthereanythinghere) { }
henrYoda henrYoda

2013/5/19

#
Yes. Look at the other pages and you can see the code
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
sorry m8. i'm trippin'. World's the base class in greenfoot, god knows how i missed that 1 it should be public MainWorldClass(int array) { super(800, 400, 1); world = array; } the 1 is the cell size in pixels any chance u could go to http://www.greenfoot.org/scenarios/8396 and set that score now
henrYoda henrYoda

2013/5/19

#
Ahhhh. still not working. Now in the game class it has the same error: Cannot find symbol - constructor MainWorldClass()
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
tell u what m8 u go to http://www.greenfoot.org/scenarios/8396 to set a score and i'll have a look through ur code to see if i can find the problem
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
honestly. it takes 90 seconds max 2 help me out. BTW i know whats wrong with ur code. and i know how 2 fix it how about helping me out for 90 seconds http://www.greenfoot.org/scenarios/8396
danpost danpost

2013/5/19

#
@henrYoda, from your code above, change your MainWorldClass class to:
import greenfoot

public class game extends MainWorldClass
{
    int[][] myTwoDArray = {  
            {0, 0, 0, 0, 0},  
            {2, 0, 1, 0, 2},  
            {0, 0, 0, 0, 0}  
    };  

    public game()
    {    
        super(myTwoDArray); // super call must always be first statement in a world constructor
    }
}
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
to anyone reading this. don't help this guy. i helped him for about 45 minutes and he couldn't take 90 seconds out his life to help me. imagine having to work with this idiot
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
nice 1 danpost
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
the next error will be about the missing //gets height of a 2D array (it equals 3) int height = myTwoDArray.length; //gets width of a 2D array (it equals 5) int width = myTwoDArray.length;
thssfrnssssmnt thssfrnssssmnt

2013/5/19

#
**** knows what he needed the width and height of the arrays for anyway
There are more replies on the next page.
1
2
3
4
5