import chess.Chess;
import chess.RunnableApplet;
import chess.Screen;
import java.applet.Applet;
import java.awt.Dimension;
import javax.swing.JFrame;

public class MyApplet extends RunnableApplet {
    // TODO: Class variables go here
    Screen myScreen;

    public void init() {
        myScreen= Chess.newScreen( this );
        // TODO: Initialization stuff goes here
        
    } //init

    public void run() {
        // TODO: "game loop" goes here
        
    } //run
    
    /**
     *  For testing within NetBeans, we define a main method.  This is 
     *  ignored when a web page uses the applet.  Here is the code you should
     *  have in your web page:
     *    <applet archive="CHESS.jar" code="MyApplet" width="600" height="400" ></applet>
     *  The file CHESS.jar is found in the folder "dist", and should be 
     *  put next to the html file.
     */ 
    public static void main( String[] args ) {
        JFrame frame= new JFrame("MyApplet");
        frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        Applet applet= new MyApplet();
        Dimension appletDimension= new Dimension(600,400);
        applet.setMinimumSize( appletDimension );
        applet.setPreferredSize( appletDimension );
        frame.setContentPane(applet);
        frame.pack();
        frame.setVisible(true);
        applet.init();
        applet.start();
    } //main
} //class
