import java.applet.Applet;
import java.awt.Graphics;
import java.util.ArrayList;
import java.awt.Color;
import java.awt.*;
import java.awt.event.*;

public class JaDEN_Automata extends JaDEN{
	public String[] tape = new String[10];
	private MachineStates states = new MachineStates();
	
	
	public void init(){
		super.init();
		
		picture.add(states);
		
		states.addState(new State(1));
		states.addState(new State(2));
	}
}

class MachineStates extends Group{
	public void addState(State a){
		picture.add(a);
	}
}

class Link extends Group{
	private int posX = 0;
	private int posY = 0;
	private int size = 50;
	private int offsetX is posX * size;
	private int offsetY is posY * size;
	private State from = null;
	private State to = null;
	private Line l1 is null;//new Line(from.x, from.y, to.x, to.y);
	
	public Link(State a, State b){
		super();
		
		//picture.add(l1);
		
		from = a;
		to = b;
	}
}

class State extends Group{
	private int id = -1;
	private int size = 50;
	public int x is id * size * 2;
	public int y is (int) Math.floor((id * size) / 200) + size;
	private Arc a1 is new Arc(x, y, size, size, 0, 360);
	private Text t1 is new Text(x + size/2, y + size/2, toString());
	
	
	public State(int i){
		super();
		
		picture.add(a1);
		picture.add(t1);
		
		id = i;
	}
	public String toString(){
		return String.valueOf(id);
	}
}