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

📄 richmantaiwanmidlet.java

📁 大富翁手机游戏
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    }

    public void d(int i1)
    {
        String as[][] = i();
        h = new g(this, 0, as, i1);
        Display.getDisplay(this).setCurrent(h);
    }

    public void g()
    {
        Object obj = null;
        try
        {
            RecordStore recordstore = RecordStore.openRecordStore("SoundStatus", false);
            byte abyte0[] = recordstore.getRecord(1);
            l = abyte0[0] != 0;
        }
        catch(Exception exception)
        {
            g(0);
        }
    }

    public void i(int i1)
    {
        Object obj = null;
        try
        {
            RecordStore recordstore = RecordStore.openRecordStore("SoundStatus", true);
            byte abyte0[] = new byte[2];
            abyte0[0] = (byte)i1;
            if(recordstore.getNumRecords() != 1)
                recordstore.addRecord(abyte0, 0, abyte0.length);
            else
                recordstore.setRecord(1, abyte0, 0, abyte0.length);
        }
        catch(Exception exception) { }
    }

    public boolean f()
    {
        boolean flag = true;
        Object obj = null;
        try
        {
            RecordStore recordstore = RecordStore.openRecordStore("DemoStatus", false);
            byte abyte0[] = recordstore.getRecord(1);
            flag = abyte0[0] != 1;
            b = abyte0[1];
        }
        catch(Exception exception)
        {
            g(0);
        }
        return flag;
    }

    public void g(int i1)
    {
        Object obj = null;
        try
        {
            RecordStore recordstore = RecordStore.openRecordStore("DemoStatus", true);
            byte abyte0[] = new byte[2];
            abyte0[0] = (byte)i1;
            abyte0[1] = (byte)b;
            if(recordstore.getNumRecords() != 1)
                recordstore.addRecord(abyte0, 0, abyte0.length);
            else
                recordstore.setRecord(1, abyte0, 0, abyte0.length);
        }
        catch(Exception exception) { }
    }

    String[][] i()
    {
        String as[][] = new String[3][2];
        String as1[] = {
            "孙小美", "阿土伯", "钱夫人"
        };
        try
        {
            RecordStore recordstore = RecordStore.openRecordStore("RichManScore", false);
            ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(recordstore.getRecord(1));
            DataInputStream datainputstream = new DataInputStream(bytearrayinputstream);
            for(int i1 = 0; i1 < 3; i1++)
            {
                as[i1][0] = as1[datainputstream.readInt()];
                as[i1][1] = "" + datainputstream.readInt();
            }

        }
        catch(Exception exception)
        {
            as[0][0] = "孙小美";
            as[0][1] = "105";
            as[1][0] = "阿土伯";
            as[1][1] = "155";
            as[2][0] = "钱夫人";
            as[2][1] = "166";
        }
        return as;
    }

    public int a(int i1, int j1)
    {
        RecordStore recordstore = null;
        int ai[][] = new int[3][2];
        byte byte0 = 0;
        for(int k1 = 0; k1 < 3; k1++)
        {
            for(int l1 = 0; l1 < 2; l1++)
                ai[k1][l1] = -1;

        }

        try
        {
            recordstore = RecordStore.openRecordStore("RichManScore", false);
        }
        catch(Exception exception)
        {
            ai[0][0] = 0;
            ai[0][1] = 105;
            ai[1][0] = 1;
            ai[1][1] = 155;
            ai[2][0] = 2;
            ai[2][1] = 166;
        }
        try
        {
            if(recordstore != null)
            {
                ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(recordstore.getRecord(1));
                DataInputStream datainputstream = new DataInputStream(bytearrayinputstream);
                for(int i2 = 0; i2 < 3; i2++)
                {
                    ai[i2][0] = datainputstream.readInt();
                    ai[i2][1] = datainputstream.readInt();
                }

                recordstore.closeRecordStore();
            }
        }
        catch(Exception exception1)
        {
            System.out.println("error in updatHighScore: " + exception1);
        }
        if(j1 < ai[0][1])
        {
            ai[2][0] = ai[1][0];
            ai[2][1] = ai[1][1];
            ai[1][0] = ai[0][0];
            ai[1][1] = ai[0][1];
            ai[0][0] = i1;
            ai[0][1] = j1;
            byte0 = 1;
        } else
        if(j1 < ai[1][1])
        {
            ai[2][0] = ai[1][0];
            ai[2][1] = ai[1][1];
            ai[1][0] = i1;
            ai[1][1] = j1;
            byte0 = 2;
        } else
        if(j1 < ai[2][1])
        {
            ai[2][0] = i1;
            ai[2][1] = j1;
            byte0 = 3;
        }
        byte abyte0[] = null;
        try
        {
            ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
            DataOutputStream dataoutputstream = new DataOutputStream(bytearrayoutputstream);
            for(int j2 = 0; j2 < 3; j2++)
            {
                for(int k2 = 0; k2 < 2; k2++)
                    dataoutputstream.writeInt(ai[j2][k2]);

            }

            abyte0 = bytearrayoutputstream.toByteArray();
            bytearrayoutputstream.close();
            dataoutputstream.close();
        }
        catch(Exception exception2)
        {
            exception2.printStackTrace();
        }
        try
        {
            RecordStore recordstore1 = RecordStore.openRecordStore("RichManScore", true);
            if(recordstore1.getNumRecords() != 1)
                recordstore1.addRecord(abyte0, 0, abyte0.length);
            else
                recordstore1.setRecord(1, abyte0, 0, abyte0.length);
            recordstore1.closeRecordStore();
        }
        catch(Exception exception3)
        {
            exception3.printStackTrace();
        }
        return byte0;
    }

    public void j()
    {
        String s = "Richman";
        String s1 = "SOFTSTAR";
        String s2 = "Grade";
        System.out.println("gameCharge");
        int i1 = e.a(s, s1, s2);
        System.out.println("ret=" + i1);
        if(i1 == 1)
        {
            j = false;
            a(i1, "付费完成,您可继续游戏");
        } else
        if(i1 < 0)
            a(i1, "付费失败,请再试一次!");
    }

    public void startApp()
    {
        System.out.println(e);
        System.gc();
        if(e == -1)
            a(true);
        else
        if(e == 0)
            d();
        else
        if(e == 1)
            b();
        else
        if(e == 2)
            c();
        else
        if(e == 3)
            m();
        else
        if(e == 4)
            h();
        else
        if(e == 5)
            b(false);
    }

    public void pauseApp()
    {
    }

    public void a()
    {
        i = null;
        e = 0;
        if(l)
            n.a("/sound/01-title.mid", -1);
        if(l)
            n.a(false);
        else
            n.a(true);
        a(false);
    }

    public void destroyApp(boolean flag)
    {
    }

    public static void e()
    {
        k.destroyApp(true);
        k.notifyDestroyed();
        k = null;
    }

    public static void a(Graphics g1, String s, int i1, int j1, int k1, int l1, int i2)
    {
        g1.setColor(l1);
        g1.drawString(s, i1 - 1, j1 - 1, i2);
        g1.drawString(s, i1, j1 - 1, i2);
        g1.drawString(s, i1 + 1, j1 - 1, i2);
        g1.drawString(s, i1 - 1, j1, i2);
        g1.drawString(s, i1 - 1, j1, i2);
        g1.drawString(s, i1 - 1, j1 + 1, i2);
        g1.drawString(s, i1, j1 + 1, i2);
        g1.drawString(s, i1 + 1, j1 + 1, i2);
        g1.setColor(k1);
        g1.drawString(s, i1, j1, i2);
    }

}

⌨️ 快捷键说明

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