Search in sources :

Example 11 with PlayerStandardTip

use of fr.neamar.lolgamedata.tips.PlayerStandardTip in project teamward-client by Neamar.

the class FilthyCasualTipBuilder method getTips.

@Override
public ArrayList<Tip> getTips(Game game, Context context) {
    ArrayList<Tip> tips = new ArrayList<>();
    for (Team team : game.teams) {
        for (Player player : team.players) {
            if (player.averageTimeBetweenGames > 3600 * 24 * 7) {
                String descriptionTemplate = context.getString(R.string.filthy_casual_description);
                String description = String.format(descriptionTemplate, player.summoner.name);
                tips.add(new PlayerStandardTip(game, player, player.champion.imageUrl, context.getString(R.string.filthy_casual), description));
            }
        }
    }
    return tips;
}
Also used : Player(fr.neamar.lolgamedata.pojo.Player) PlayerStandardTip(fr.neamar.lolgamedata.tips.PlayerStandardTip) ArrayList(java.util.ArrayList) PlayerStandardTip(fr.neamar.lolgamedata.tips.PlayerStandardTip) Tip(fr.neamar.lolgamedata.tips.Tip) Team(fr.neamar.lolgamedata.pojo.Team)

Aggregations

PlayerStandardTip (fr.neamar.lolgamedata.tips.PlayerStandardTip)11 Player (fr.neamar.lolgamedata.pojo.Player)10 Tip (fr.neamar.lolgamedata.tips.Tip)10 ArrayList (java.util.ArrayList)10 Team (fr.neamar.lolgamedata.pojo.Team)9 Account (fr.neamar.lolgamedata.pojo.Account)1