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

2014/4/5

Scoreboards and counters...and a big thank you to anyone who reads through all this

1
2
Roz Roz

2014/4/6

#
Erdelf...........I'm not sure, but I think line 76 is tryToEatPatrick
Roz Roz

2014/4/6

#
Hi Dan...thank you so much for your input and thanks for bearing with me....this is my first game. With regard to your first post and the 'get' method, would it look something like this?
public int getCounter()
    {   
        return counter.getValue();
    }
and would I call it with something like this: getCounter(); ???
danpost danpost

2014/4/6

#
Roz wrote...
With regard to your first post and the 'get' method, would it look something like this? < Code omitted > and would I call it with something like this: getCounter(); ???
That would work. Only thing, the name of the method does not reflect what the method does. Maybe 'public int getCounterValue()' would be more appropriate; called with 'getCounterValue()'.
Roz Roz

2014/4/6

#
Thanks! I'm going to try that as well as your suggestion for the tryToEatPatrick method.......
danpost danpost

2014/4/6

#
The last line in the tryToEatPatrick method would then be:
patrickworld.gameOver(patrick.getCounterValue());
Roz Roz

2014/4/6

#
You are brilliant!! It works and I can't thank you enough :)
Roz Roz

2014/4/6

#
And many thanks for your efforts too Erdelf.
You need to login to post a reply.
1
2