/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ManicMiner;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * @author supervisor
 */
public class MidletInicio extends MIDlet implements CommandListener {

    Command exit;
    Display d;
    MinerCanvas mc;

    public MidletInicio(){
        System.out.println("llega222222");
       exit = new Command("Salir",Command.EXIT, 2);
       d = Display.getDisplay(this);
        mc = new MinerCanvas();
        mc.addCommand(exit);
        mc.setCommandListener(this);
        new Thread(mc).start();

    }


    public void commandAction(Command c, Displayable d){
        if(c==exit)
        {
            destroyApp(false);
            notifyDestroyed();
        }

    }
    public void startApp() {
        d.setCurrent(mc);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
}
