All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.esfinge.gamification.event.BonusBuilder Maven / Gradle / Ivy

package net.sf.esfinge.gamification.event;

import java.util.function.BiPredicate;

import net.sf.esfinge.gamification.achievement.Achievement;
import net.sf.esfinge.gamification.listener.EvaluationAchievementListener;
import net.sf.esfinge.gamification.mechanics.Game;

public class BonusBuilder {

	Game game;
	Achievement bonus;

	public BonusBuilder(Game game, Achievement bonus) {
		super();
		this.game = game;
		this.bonus = bonus;
	}

	public  void when(BiPredicate when) {
		game.addListener(new EvaluationAchievementListener(when, bonus));
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy