⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blackandwhite.java

📁 一个黑白棋的源代码(尚未完成
💻 JAVA
字号:
/* * BlackAndWhite.java * * Created on 2007-9-28, 14:50:12 * * To change this template, choose Tools | Templates * and open the template in the editor. */package org.yangcq.controller;import java.util.Stack;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import org.yangcq.canvas.BlackWhiteGameCanvas;/** * @author Administrator */public class BlackAndWhite extends MIDlet{    private BlackWhiteGameCanvas gameCanvas;    private Stack stack;    public BlackAndWhite()    {        this.gameCanvas = new BlackWhiteGameCanvas(this);        Thread game=new Thread(gameCanvas);        game.start();        this.stack = new Stack();    }    public void startApp()    {        if (this.stack.size() != 0)        {            Display.getDisplay(this).setCurrent((Displayable) this.stack.pop());        } else        {            Display.getDisplay(this).setCurrent(gameCanvas);            this.stack.push(gameCanvas);        }    }    public void pauseApp()    {        Display.getDisplay(this).setCurrent(null);        this.stack.pop();    }    public void destroyApp(boolean unconditional)    {    }    public void exit()    {        this.destroyApp(false);        this.notifyDestroyed();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -