package projects.FLP.nodes.nodeImplementations;

import java.awt.Color;
import java.awt.Graphics;
import java.util.LinkedList;

import projects.defaultProject.nodes.messages.Msg;
import projects.defaultProject.nodes.nodeImplementations.CNode;
import sinalgo.gui.transformation.PositionTransformation;




public class FLPNode extends CNode {
 
	int v;
	public int d=-1;
	
	public void initialization() {
	}
	
	public void spontaneously() {
	}
	
	public void receipt(LinkedList<Msg> inbox) {
		}
	
 
	
	Color couleur() {
		if(this.Crashed()) return Color.black;
		if(d==-1) {
			if(this.v==0) return Color.cyan;
			return Color.pink;
		}
		if(d==0) return Color.blue;
		return Color.red;
	}
	

  
    public void draw(Graphics g, PositionTransformation pt, boolean highlight){	 
    	String text="";
    	if(this.Id()>0)	text= ""+this.Id()+"";
    	this.setColor(couleur());
    	super.drawNodeAsDiskWithText(g, pt, false, text, 30, Color.black);
	 
    }	
    
}
