import javax.swing.JFrame;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class BattleSimulator {
    private static final int FRAME_WIDTH = 520;
    private static final int FRAME_HEIGHT = 690;

    public static void main (String [] args) {
	JFrame frame = new JFrame ("Battle Simulator");
	frame.setSize (FRAME_WIDTH, FRAME_HEIGHT);
	
	frame.addWindowListener 
	    (new WindowAdapter () { 
		    public void windowClosing (WindowEvent e) {
			System.exit (0);
		    }
		}
	     );

	Grid grid = new Grid (15, 15);   
	Simulator ca = new Simulator (FRAME_HEIGHT, FRAME_WIDTH, grid);
	Container content = frame.getContentPane ();

	// Add classes to the simulation.
        
        ca.addClass ("HeavyInfantry");
	ca.addClass ("LightInfantry");
        ca.addClass ("ArcherInfantry");
        ca.addClass ("Mercenary");
        ca.addClass ("Maximus");
        ca.addClass ("Wizard");
	ca.addClass ("Blob");
        
        
        
        ca.addTeam ("Red");
        ca.addTeam ("Blue");
         ca.addTeam ("Green");
          ca.addTeam ("Black");
           ca.addTeam ("White");
            ca.addTeam ("Orange");
             ca.addTeam ("Purple");
             
             ca.addSpeed("Normal");
             ca.addSpeed("Fast");
             ca.addSpeed("Faster");
             ca.addSpeed("Fastest");
        
	if (content != null) {
	    content.add (ca, BorderLayout.CENTER);
	} else {
	    System.err.println ("ERROR: No content pane");
	}

	frame.show ();
    }
}