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

package ManicMiner;

import java.io.*;
import javax.microedition.lcdui.game.*;
import javax.microedition.lcdui.*;

/**
 *
 * @author supervisor
 */
public class MinerCanvas extends GameCanvas implements Runnable {

    LayerManager lm;
    RemakeManicMiner rm;

    MinerCanvas()
    {
        super(true);

        lm = new LayerManager();
        rm = new RemakeManicMiner();
        try{
        rm.updateLayerManagerForFase1(lm);
        
        }catch(IOException ioe){
            System.out.println(ioe);
        }

    }
    
    public void run(){
        
        Graphics g = this.getGraphics();

           g.setColor(0,0,0);
           this.lm.paint(g, 0, 0);
           flushGraphics(0, 0, this.getWidth(), this.getHeight());

           try {
               Thread.sleep(20);
           } catch (InterruptedException ex) {
               ex.printStackTrace();
          }
    }

}
