use of fr.neamar.lolgamedata.tips.PlayerStandardTip in project teamward-client by Neamar.
the class HardcoreGamerTipBuilder 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 < 24 * 3600 / 10) {
String descriptionTemplate = context.getString(R.string.hardcore_gamer_description);
String description = String.format(descriptionTemplate, player.summoner.name);
tips.add(new PlayerStandardTip(game, player, player.champion.imageUrl, context.getString(R.string.hardcore_gamer), description));
}
}
}
return tips;
}
use of fr.neamar.lolgamedata.tips.PlayerStandardTip in project teamward-client by Neamar.
the class NoFlashTipBuilder 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.spellD.name.equals("Flash") && !player.spellF.name.equals("Flash")) {
String descriptionTemplate = context.getString(R.string.s_has_no_flash);
String description = String.format(descriptionTemplate, player.summoner.name, player.spellD.name, player.spellF.name);
tips.add(new PlayerStandardTip(game, player, player.champion.imageUrl, context.getString(R.string.no_flash), description));
}
}
}
return tips;
}
use of fr.neamar.lolgamedata.tips.PlayerStandardTip in project teamward-client by Neamar.
the class NoSmiteTipBuilder method getTips.
@Override
public ArrayList<Tip> getTips(Game game, Context context) {
ArrayList<Tip> tips = new ArrayList<>();
// Only apply on Summoner's Rift
if (GameActivity.getMapName(game.mapId) != R.string.summoners_rift) {
return tips;
}
for (Team team : game.teams) {
Boolean teamHasSmite = false;
for (Player player : team.players) {
if (player.spellD.name.equals("Smite") || player.spellF.name.equals("Smite")) {
teamHasSmite = true;
break;
}
}
if (!teamHasSmite) {
String description = context.getString(R.string.no_smite_desc);
description = String.format(description, team.getName(context));
tips.add(new PlayerStandardTip(game, null, SMITE_URL, context.getString(R.string.no_smite), description));
}
}
return tips;
}
use of fr.neamar.lolgamedata.tips.PlayerStandardTip in project teamward-client by Neamar.
the class NoobTipBuilder 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.champion.mastery == 0) {
String descriptionTemplate = context.getString(R.string.is_playing_for_first_time);
String description = String.format(descriptionTemplate, player.summoner.name, player.champion.name);
tips.add(new PlayerStandardTip(game, player, player.champion.imageUrl, context.getString(R.string.noobs_noobs_everywhere), description));
}
}
}
return tips;
}
use of fr.neamar.lolgamedata.tips.PlayerStandardTip in project teamward-client by Neamar.
the class DoubleSmiteTipBuilder method getTips.
@Override
public ArrayList<Tip> getTips(Game game, Context context) {
ArrayList<Tip> tips = new ArrayList<>();
// Only apply on Summoner's Rift
if (GameActivity.getMapName(game.mapId) != R.string.summoners_rift) {
return tips;
}
for (Team team : game.teams) {
int smiteCounter = 0;
for (Player player : team.players) {
if (player.spellD.name.equals("Smite") || player.spellF.name.equals("Smite")) {
smiteCounter++;
}
}
if (smiteCounter > 1) {
String description = context.getString(R.string.double_smite_desc);
description = String.format(description, team.getName(context));
tips.add(new PlayerStandardTip(game, null, SMITE_URL, context.getString(R.string.double_smite), description));
}
}
return tips;
}