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

import java.util.*;

public class ProjectileStrategy {
	private Map.Entry<Integer, Object> value = new AbstractMap.SimpleEntry<>(2, "YouShootTheDragonWithTheMagicalCrossbowAndItFallsDeadOnTheGround!");
	public void updateDragonSlayer(Map.Entry<Object, Object> dragonSlayer) {
		Map.Entry<Integer, Object> temp_if5;
		if ((this.value.getKey()==dragonSlayer.getKey())) {
			temp_if5 = this.value;
		} else {
			temp_if5 = new AbstractMap.SimpleEntry<>(0, "none");
		}
		value = temp_if5;
	}
	public Map.Entry<Integer, Object> getValue() {
		return new AbstractMap.SimpleEntry<>(value);
	}
}