Search in sources :

Example 1 with GameAlias

use of me.semx11.autotip.config.GlobalSettings.GameAlias in project Hyperium by HyperiumClient.

the class Stats method addCoins.

protected void addCoins(String game, Coins coins) {
    coins = new Coins(coins);
    for (GameGroup group : settings.getGameGroups()) {
        if (game.equals(group.getName())) {
            for (String groupGame : group.getGames()) {
                addCoins(groupGame, coins);
            }
            return;
        }
    }
    for (GameAlias alias : settings.getGameAliases()) {
        for (String aliasAlias : alias.getAliases()) {
            if (game.equals(aliasAlias)) {
                for (String aliasGame : alias.getGames()) {
                    addCoins(aliasGame, coins);
                }
                return;
            }
        }
    }
    gameStatistics.merge(game, coins, Coins::merge);
}
Also used : GameGroup(me.semx11.autotip.config.GlobalSettings.GameGroup) GameAlias(me.semx11.autotip.config.GlobalSettings.GameAlias)

Aggregations

GameAlias (me.semx11.autotip.config.GlobalSettings.GameAlias)1 GameGroup (me.semx11.autotip.config.GlobalSettings.GameGroup)1