Hello,

Billabong is just a small board game. You have kangaroos that you move clockwise around a lake. It looks like this:

http://www.deskovehry.com/fotky/billabong/billabong-06.jpg

First you need to draw the board etc. The example looks like this:

static private void printField(String[][] field) {      
        System.out.print("    ");
        String letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        for (int x=0; x<Board.dimensionX; x++)
            System.out.print(letters.charAt(x));
        System.out.println(""); 

        for (int y=0; y<Board.dimensionY; y++) {
            String line = y +"";
            String number = y +"";
            for (int i=number.length(); i<3; i++)
                line = " " + line;
            line += " ";

            for (int x=0; x<Board.dimensionX; x++) {
                line += field[x][y];
            }
            System.out.println(line);
        }
    }


    static private String[][] constructField(GameState gameState) {
        String[][] field = new String[Board.dimensionX][Board.dimensionY];

        // init default field of sand, water and river
        for (int x=0; x<Board.dimensionX; x++)
            for (int y=0; y<Board.dimensionY; y++)
                field[x][y] = PLACE_SAND;

        for (Position p : Board.water)
            field[p.x][p.y] = PLACE_WATER;

        for (Position p : Board.riverLeft)
            field[p.x][p.y] = PLACE_RIVER_LEFT;
    }

Now you need to construct the kangaroos. That will be done in this snippet:

static private String[][] constructField(GameState gameState) {
        //CODE FROM ABOVE GOES HERE


        //Kangaroos goe here

        return field;
    }

Now I am not sure how I "draw" a kangaroo here in Java. To access the kangaroos, you simply use getKangaroos().
So hwo would I implement a kangaroo here!?

To access the kangaroos, you simply use getKangaroos().

What exactly does that return - is it a Kangaroo object? If so, what attributes/methods does that support?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.