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

2018/4/24

Help Me With Counter Trouble

LambUsername LambUsername

2018/4/24

#
How do I subtract from a counter, I wrote: Ground Ground = (Ground)getWorld(); Counter theCounter = Ground.getCounter(); theCounter.add(-1); It won't recognise the .add() bit ...
danpost danpost

2018/4/24

#
LambUsername wrote...
How do I subtract from a counter, I wrote: << Code Omitted >> It won't recognise the .add() bit ...
If it does not recognize it, then it probably is not part of the Counter class (although, it is part of the Counter class provided by greenfoot). Show your entire Counter class coding for review (please use code tags).
You need to login to post a reply.