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

📄 g.java

📁 大富翁手机游戏
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 

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

public class g extends Canvas
    implements CommandListener
{

    RichmanTaiwanMIDlet h;
    int b;
    int j[];
    int a;
    String f[][];
    int i;
    private Command e;
    private Font d;
    private Image g;
    private Image c;

    public g(RichmanTaiwanMIDlet richmantaiwanmidlet, int k, String as[][])
    {
        this(richmantaiwanmidlet, k);
        f = as;
        c = a("head.png");
    }

    public g(RichmanTaiwanMIDlet richmantaiwanmidlet, int k, String as[][], int l)
    {
        this(richmantaiwanmidlet, k);
        f = as;
        i = l;
        c = a("head.png");
    }

    public g(RichmanTaiwanMIDlet richmantaiwanmidlet, int k, int l)
    {
        this(richmantaiwanmidlet, k);
        i = l;
    }

    public g(RichmanTaiwanMIDlet richmantaiwanmidlet, int k)
    {
        h = null;
        j = null;
        f = (String[][])null;
        i = 0;
        d = Font.getFont(0, 0, 0);
        g = null;
        c = null;
        h = richmantaiwanmidlet;
        a = k;
        richmantaiwanmidlet.e = 2;
    }

    void a()
    {
        switch(a)
        {
        case 1: // '\001'
            h.a(j[b]);
            break;

        case 2: // '\002'
            h.n();
            break;
        }
    }

    protected void paint(Graphics g1)
    {
        g1.setColor(255, 255, 255);
        g1.fillRect(0, 0, getWidth(), getHeight());
        if(a == 0)
        {
            g1.setColor(252, 150, 44);
            g1.fillRect(0, 0, getWidth(), getHeight());
            g1.setColor(252, 110, 4);
            g1.fillRect(0, 30, 176, 20);
            if(i > 0)
            {
                g1.setColor(255, 255, 0);
                if(i == 1)
                    g1.fillRect(0, 60, 176, 32);
                else
                if(i == 2)
                    g1.fillRect(0, 100, 176, 32);
                else
                if(i == 3)
                    g1.fillRect(0, 140, 176, 32);
            }
            g1.setColor(0, 0, 128);
            g1.setFont(d);
            g1.setColor(255, 255, 255);
            g1.drawString("名次", 1, 30, 20);
            g1.drawString("玩家", 40, 30, 20);
            g1.drawString("回合数", 126, 30, 20);
            g1.setColor(0, 0, 0);
            g1.drawString("最高记录", (176 - d.stringWidth("最高记录")) / 2, 3, 20);
            g1.drawString("1", 10, 68, 20);
            g1.drawString("2", 10, 108, 20);
            g1.drawString("3", 10, 148, 20);
            g1.drawString(f[0][0], 30, 68, 20);
            g1.drawString(f[1][0], 30, 108, 20);
            g1.drawString(f[2][0], 30, 148, 20);
            g1.drawString(f[0][1], 140, 68, 20);
            g1.drawString(f[1][1], 140, 108, 20);
            g1.drawString(f[2][1], 140, 148, 20);
            g1.drawImage(b(f[0][0]), 100, 60, 20);
            g1.drawImage(b(f[1][0]), 100, 100, 20);
            g1.drawImage(b(f[2][0]), 100, 140, 20);
        } else
        if(a == 3)
        {
            g1.setColor(252, 150, 44);
            g1.fillRect(0, 0, getWidth(), getHeight());
            if(i > 0)
            {
                g1.setColor(252, 110, 4);
                g1.fillRoundRect(32, 68, 116, 44, 5, 5);
                g1.setColor(255, 255, 255);
                g1.fillRoundRect(30, 66, 116, 44, 5, 5);
                g1.setColor(0, 0, 0);
                g1.setFont(d);
                g1.drawString("恭喜您, 您的成", (176 - d.stringWidth("恭喜您,您的成")) / 2, 70, 20);
                g1.drawString("绩进入排名!", (176 - d.stringWidth("绩挤进排名!")) / 2, 90, 20);
            } else
            {
                g1.setColor(252, 110, 4);
                g1.fillRoundRect(32, 68, 116, 66, 5, 5);
                g1.setColor(255, 255, 255);
                g1.fillRoundRect(30, 66, 116, 66, 5, 5);
                g1.setColor(0, 0, 0);
                g1.setFont(d);
                g1.drawString("很抱歉, 您的成", (176 - d.stringWidth("很抱歉, 您的成")) / 2, 70, 20);
                g1.drawString("绩未能进入排名,", (176 - d.stringWidth("绩未能挤进排名,")) / 2, 90, 20);
                g1.drawString("请再接再厉!", (176 - d.stringWidth("请再接再励!")) / 2, 110, 20);
            }
        }
        if(e == null)
        {
            e = new Command("返回", 2, 1);
            addCommand(e);
            setCommandListener(this);
        }
    }

    public void pointerPressed(int k, int l)
    {
        if(a == 0)
        {
            c = null;
            h.a(false);
        } else
        if(a == 3)
            h.d(i);
    }

    public void keyPressed(int k)
    {
    }

    private Image b(String s)
    {
        Image image = Image.createImage(32, 32);
        Graphics g1 = image.getGraphics();
        if(s.equals("钱夫人"))
            g1.drawImage(c, 0, 0, 20);
        else
        if(s.equals("阿土伯"))
            g1.drawImage(c, 0, -32, 20);
        else
        if(s.equals("孙小美"))
            g1.drawImage(c, 0, -64, 20);
        return image;
    }

    private Image a(String s)
    {
        return Image.createImage("/" + s);
        Exception exception;
        exception;
        System.out.println("head err");
        return null;
    }

    public void commandAction(Command command, Displayable displayable)
    {
        Command _tmp = command;
        if(command.getCommandType() == 2)
            if(a == 0)
            {
                c = null;
                h.a(false);
            } else
            if(a == 3)
                h.d(i);
    }
}

⌨️ 快捷键说明

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