Skip to content

Commit

Permalink
Correct the index.
Browse files Browse the repository at this point in the history
  • Loading branch information
tberthel committed Jan 25, 2025
1 parent 091671c commit 326a6b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
package org.allbinary.game.score;

import org.allbinary.game.GameInfo;
import org.allbinary.logic.string.CommonStrings;

public class HighScoresBase implements HighScoresFactoryInterface
{

protected CommonStrings commonStrings = CommonStrings.getInstance();

protected HighScoresBase()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void fetchHighScores(final GameInfo gameInfo, final HighScoresResultsList

highScoresResultsListener.setHighScoresArray(highScoresArray);
} catch (Exception e) {
LogUtil.put(LogFactory.getInstance(CommonStrings.getInstance().EXCEPTION, this, FETCH, e));
LogUtil.put(LogFactory.getInstance(commonStrings.EXCEPTION, this, FETCH, e));

//super.createHighScores(gameInfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.allbinary.logic.communication.log.LogFactory;
import org.allbinary.logic.communication.log.LogUtil;
import org.allbinary.logic.java.bool.BooleanFactory;
import org.allbinary.logic.string.CommonStrings;
import org.allbinary.logic.system.SoftwareInformation;
import org.allbinary.logic.system.security.licensing.AbeClientInformationInterface;
import org.allbinary.thread.SecondaryThreadPool;
Expand Down Expand Up @@ -61,7 +60,7 @@ public void fetchHighScores(final GameInfo gameInfo, final HighScoresResultsList
public void run() {

try {
LogUtil.put(LogFactory.getInstance(CommonStrings.getInstance().START, this, FETCH));
LogUtil.put(LogFactory.getInstance(commonStrings.START, this, FETCH));

highScoresArray[0] = RecordStoreHighScores.getInstance(abeClientInformation, gameInfo,
TOP, PERSONAL_HIGH_SCORES, SCORES, new ScoreComparator(true));
Expand All @@ -83,12 +82,12 @@ public void run() {
softwareInformation, gameInfo2,
WORLD_TOP_SCORES, SCORES, BooleanFactory.getInstance().FALSE, preload);

LogUtil.put(LogFactory.getInstance(CommonStrings.getInstance().END, this, FETCH));
LogUtil.put(LogFactory.getInstance(commonStrings.END, this, FETCH));

LastFetchHighScoresFactory.getInstance().highScoresArray = highScoresArray;
highScoresResultsListener.setHighScoresArray(highScoresArray);
} catch (Exception e) {
LogUtil.put(LogFactory.getInstance(CommonStrings.getInstance().EXCEPTION, this, FETCH, e));
LogUtil.put(LogFactory.getInstance(commonStrings.EXCEPTION, this, FETCH, e));

//return super.createHighScores(gameInfo);
}
Expand All @@ -103,7 +102,7 @@ public HighScoresHelperBase createHighScoresHelper() {
}

public static boolean loaded(final int index2) {
if(index2 > 0) {
if(index2 >= 0) {
return true;
}
return false;
Expand Down

0 comments on commit 326a6b3

Please sign in to comment.