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

2013/5/26

Bug in UserInfo-class!

Busch2207 Busch2207

2013/5/26

#
This topic is for the greenfoot-Team, because there is a bug in the UserInfo getNearby()-Method! If one has the worst score and you enter in the getNearby(int)-Method of the UserInfo-class an odd number, you get a List with the entered number+1 entrys and so the List is too long for some highscores... To see, what I mean, davmac can take a look at my Highscore-scenario! I've programmed, that he'll always has the worst score!
davmac davmac

2013/5/26

#
What should I be looking for? I see a list of 5 high scores on the left and 9 low scores on the right. Looking at the code, this seems like it's exactly what I should see.
Busch2207 Busch2207

2013/5/26

#
Yes, you see the nine on the right, but you should be the last one at the right highscore? https://dl.dropboxusercontent.com/u/86371197/HighScore.PNG Are you there? If yes, I really wonder, because, when I open it in Greenfoot and set my name to 'davmac' with Control+Shift+P, I'm not in the right list. (Following sets your score at -1 in the HighScoreWorld-class and so at the end of the list!) ui_.setScore(ui_.getUserName().equals("davmac")?-1:Greenfoot.getRandomNumber(10001));
You need to login to post a reply.