package org.pfaa.chemica.model;


public class SimpleAlloy extends SimpleMixture implements Alloy {

	private Element base;
	private Strength strength;
	
	public SimpleAlloy(Element base, Element solute, double weight) {
		super(new MixtureComponent(base, 1.0), new MixtureComponent(solute, weight));
		this.base = base;
		this.strength = base.getStrength();
	}

	private SimpleAlloy(Element base, Mixture mixture, Strength strength) {
		super(mixture.getComponents());
		this.base = base;
		this.strength = strength;
	}

	@Override
	public Element getBase() {
		return this.base;
	}

	@Override
	public Alloy alloy(Element material, double weight) {
		Mixture mixture = super.mix(material, weight);
		return new SimpleAlloy(this.base, mixture, this.strength);
	}

	@Override
	public Strength getStrength() {
		return this.strength;
	}
	
	public Alloy setStrength(Strength strength) {
		this.strength = strength;
		return this;
	}
}

@@ -145,16 +145,40 @@
 rength;%0A
+%09private Fusion fusion;%0A
 %09%0A%09publi
@@ -948,10 +948,186 @@
 his;%0A%09%7D%0A
+%09%0A%09@Override%0A%09public Fusion getFusion() %7B%0A%09%09return this.fusion;%0A%09%7D%0A%0A%09@Override%0A%09public Alloy fuse(int temperature) %7B%0A%09%09this.fusion = new Fusion(temperature);%0A%09%09return this;%0A%09%7D%0A
 %7D%0A

implement Fusible for alloys