import javax.swing.JFrame;
import java.awt.Point;
import java.util.LinkedList;

public class GameOfLife
{
    public static void main(String[] args)
    {
        JFrame frame = new JFrame("Game of Life");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        AutomatonView canvas = null;
        LinkedList<Point> init = new LinkedList<Point>();

        init.add(new Point(79, 119));
        init.add(new Point(80, 119));
        init.add(new Point(81, 119));
        init.add(new Point(81, 120));
        init.add(new Point(80, 121));

        canvas = new AutomatonView();
        frame.getContentPane().add(canvas);
        frame.setSize(canvas.getWidth(), canvas.getHeight());
        frame.setVisible(true);

        while(true){
        	canvas.repaint();	
        	try {
        	Thread.sleep(50); //go to sleep for 50 msec
        	} catch (InterruptedException e){
        		System.out.println(e);
        	}
        }
    }
}
