// Porte NON, herite de Composant
public class Not extends Composant {

	static int n = 1;
	
	public Not(int n_in, int n_out){
		super(n_in, n_out);
		charName 	  = "!";
		composantName = "Non";
		Name		  = "Non_"+(n++);
	}

	protected void doWork() {
		boolean state = true;
		for(Pin pin : pin_in)
			if(pin.isOn()){ state = false; break; }
		for(Pin pin : pin_out)
			pin.setState(state);
	}

}
