Newer
Older
GeneratedDesignPatternsByDTRAM / DTRAM / src / strategy / Strategy.java
Okina on 20 Jul 2022 842 bytes upload strategy
package strategy;

import java.util.*;

public class Strategy {
	private MeleeStrategy meleeStrategy;
	private SpellStrategy spellStrategy;
	private ProjectileStrategy projectileStrategy;
	private DragonSlayer dragonSlayer;
	public Strategy() {
		meleeStrategy = new MeleeStrategy();
		spellStrategy = new SpellStrategy();
		projectileStrategy = new ProjectileStrategy();
		dragonSlayer = new DragonSlayer(meleeStrategy,spellStrategy,projectileStrategy);
	}
	public Map.Entry<Integer, Object> getProjectileStrategy() {
		return projectileStrategy.getValue();
	}
	public Map.Entry<Integer, Object> getSpellStrategy() {
		return spellStrategy.getValue();
	}
	public Map.Entry<Integer, Object> getMeleeStrategy() {
		return meleeStrategy.getValue();
	}
	public Map.Entry<Object, Object> getDragonSlayer() {
		return dragonSlayer.getValue();
	}
}