亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wormscore.java

?? 名稱:games
?? JAVA
字號:
/* * * Copyright ? 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. *//* * WormScore.java * * Created on March 30, 2001, 16:15 * @version */package example.wormgame;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.DataInputStream;import java.io.DataOutputStream;import java.io.IOException;import java.lang.InterruptedException;import java.lang.Runnable;import java.lang.System;import javax.microedition.lcdui.Canvas;import javax.microedition.lcdui.Font;import javax.microedition.lcdui.Graphics;import javax.microedition.rms.RecordStore;import javax.microedition.rms.RecordStoreException;/** * The WormScore keeps track of the high scores for each of the worm * levels. All access to the scores occur through static methods. There * can never be a WormScore object. * * We cache the scores and names for quick access during game play. The * calling application must first call openHighScores() to open the * score database. Finally, a closeHighScores() must be called to release * system resources. */public class WormScore {    /** Array of high scores for each game level. */    private static short[] highScore = new short[WormPit.MAX_LEVELS];    /** Array of player names for each high score level. */    private static String[] highScoreName = new String[WormPit.MAX_LEVELS];    /** Current score for this game. */    private static RecordStore myStore;    /** Is the internal score struct initialized? */    private static boolean highScoresHaveBeenInit; /* = false; */    /** Default constructor can not be instantiated. */    private WormScore() {    }    /**     * Initialize all high scores to 0.     */    private static void initializeScores() {        /* Initialize the score store */        ByteArrayOutputStream baos = new ByteArrayOutputStream();        DataOutputStream dos = new DataOutputStream(baos);        byte[] b;        try {            try {                dos.writeShort(0);                dos.writeUTF("");                b = baos.toByteArray();                dos.close();            } catch (IOException ioe) {                throw new RecordStoreException();            }            for (int i = 0; i < WormPit.MAX_LEVELS; i++) {                myStore.addRecord(b, 0, b.length);            }        } catch (RecordStoreException rse) {            /* Silently fail; exception to read high score is non-critical */            closeHighScores();        }    }    /**     * Open the high score storage file. If the file doesn't exist,     * initialize all high scores to 0.     */    static void openHighScores() {        try {            myStore = RecordStore.openRecordStore("HighScores", true);            if (highScoresHaveBeenInit) {                return;            }            /* Intialize the internal score structures */            if (myStore.getNumRecords() == 0) {                initializeScores();            } else {                /* Read high score store */                ByteArrayInputStream bais;                DataInputStream dis;                byte[] data;                for (int i = 0; i < WormPit.MAX_LEVELS; i++) {                    data = myStore.getRecord(i + 1);                    if (data != null) {                        try {                            bais = new ByteArrayInputStream(data);                            dis = new DataInputStream(bais);                            highScore[i] = dis.readShort();                            highScoreName[i] = dis.readUTF();                            dis.close();                        } catch (IOException ioe) {                        }                    }                }            }            highScoresHaveBeenInit = true;        } catch (RecordStoreException rse) {            /* Silently fail; exception to read high score is non-critical */        }    }    /**     * Close the high score file     */    static void closeHighScores() {        if (myStore != null) {            try {                myStore.closeRecordStore();            } catch (RecordStoreException frse) {            }            myStore = null;        }    }    /**     * Save high score for posterity.     * @param level current game level     * @param newScore current game score to be recorded     * @param name current user name to be recorded     */    static void setHighScore(int level, int newScore, String name) {        ByteArrayOutputStream baos;        DataOutputStream das;        byte[] data;        /* Only save score if it's higher */        if (newScore <= highScore[level]) {            return;        }        try {            try {                baos = new ByteArrayOutputStream();                das = new DataOutputStream(baos);                das.writeShort((short)newScore);                das.writeUTF(name);                data = baos.toByteArray();                das.close();            } catch (IOException ioe) {                throw new RecordStoreException();            }            if (myStore == null) {                openHighScores();                myStore.setRecord(level + 1, data, 0, data.length);                closeHighScores();            } else {                myStore.setRecord(level + 1, data, 0, data.length);            }        } catch (RecordStoreException rse) {            /* Silently fail; exception to save high score is non-critical */        }        highScore[level] = (short)newScore;        highScoreName[level] = name;    }    /**     * Return the high score for a given level.     * @param level current level for high score check     * @return numeric value for highest score at the     * requested level     */    static short getHighScore(int level) {        if (!highScoresHaveBeenInit) {            openHighScores(); // Force scores to be initialized            closeHighScores();        }        return highScore[level];    }    /**     * Return the high score name for a given level.     * @param level current level for high score check     * @return name for highest score at the     * requested level     */    static String getHighScoreName(int level) {        if (!highScoresHaveBeenInit) {            openHighScores(); // Force scores to be initialized            closeHighScores();        }        return highScoreName[level];    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久一留热品黄| 国产日韩精品一区二区浪潮av| 国产一区二区三区综合| 亚洲精品视频免费观看| 精品精品国产高清一毛片一天堂| 色综合天天在线| 韩日精品视频一区| 亚洲18女电影在线观看| 国产精品久久久一本精品| 欧美成人vr18sexvr| 欧美日韩一区二区在线观看视频 | 欧美一级理论片| 99re视频这里只有精品| 国产一区美女在线| 欧美aa在线视频| 亚洲一区视频在线| 中文字幕亚洲一区二区av在线| 日韩欧美一卡二卡| 91精品国产一区二区人妖| 91免费视频网址| www.欧美色图| 成人午夜视频在线观看| 久久狠狠亚洲综合| 日韩电影免费在线看| 亚洲在线免费播放| 亚洲资源在线观看| 亚洲欧洲综合另类| 亚洲欧美日韩国产中文在线| 国产天堂亚洲国产碰碰| 精品日韩欧美在线| 日韩精品专区在线影院重磅| 在线播放一区二区三区| 欧美性猛交xxxxxx富婆| 91免费观看在线| 91看片淫黄大片一级在线观看| 岛国精品在线观看| 国产精品91一区二区| 国产一区二区免费在线| 国产麻豆欧美日韩一区| 国产成人综合视频| 国产乱对白刺激视频不卡| 九一九一国产精品| 国产在线精品免费| 国产美女娇喘av呻吟久久| 国产一区高清在线| 国产精品一区三区| 国产成人精品免费一区二区| 国产成人亚洲综合色影视| 国产精品亚洲а∨天堂免在线| 国产精品一区久久久久| 成人av集中营| 色婷婷狠狠综合| 欧美日韩国产小视频在线观看| 欧美精品日韩一本| 欧美一级高清片在线观看| 日韩欧美一区中文| 久久久久综合网| 国产精品国产三级国产aⅴ原创 | 一本在线高清不卡dvd| 91在线播放网址| 欧美色综合网站| 欧美一卡2卡3卡4卡| 欧美变态凌虐bdsm| 中文天堂在线一区| 一区二区高清免费观看影视大全 | 久久香蕉国产线看观看99| 国产婷婷一区二区| 亚洲日本va午夜在线影院| 亚洲综合一区二区三区| 久久99国产精品免费| 国产91综合网| 欧美日韩精品一二三区| 欧美精品一区二区三| 国产精品久久久久一区二区三区| 亚洲图片自拍偷拍| 精品一区二区三区欧美| 91麻豆精东视频| 欧美一区二区三区在| 中文字幕精品—区二区四季| 亚洲最大的成人av| 韩国女主播一区| 91搞黄在线观看| 日韩精品一区二区三区在线观看 | 国产成人综合视频| 天天影视涩香欲综合网 | 国产精品美女久久久久久久网站| 三级影片在线观看欧美日韩一区二区 | 日韩高清欧美激情| 亚洲美女电影在线| 成人av资源网站| 国产精品天天摸av网| 精品免费一区二区三区| 亚洲人吸女人奶水| 国内精品伊人久久久久影院对白| 97久久人人超碰| 色婷婷亚洲婷婷| 亚洲色图制服诱惑 | 午夜精品成人在线视频| 国产成人精品影院| 国产精品卡一卡二卡三| 国产精品91一区二区| 亚洲精品少妇30p| 精品在线观看视频| 91国偷自产一区二区三区观看| 日韩欧美一卡二卡| 一区二区在线电影| 国产成人午夜片在线观看高清观看| 欧美在线免费观看视频| 欧美激情一区二区三区不卡| 另类中文字幕网| 欧美浪妇xxxx高跟鞋交| 一区二区三区在线视频观看| 国产91精品久久久久久久网曝门| 欧美日韩国产高清一区二区 | 欧美精品粉嫩高潮一区二区| 最近中文字幕一区二区三区| 国产高清在线观看免费不卡| 欧美mv日韩mv国产网站app| 亚洲18女电影在线观看| 91国偷自产一区二区三区观看| 中文字幕在线观看不卡| 国产高清亚洲一区| 久久精品视频免费| 紧缚奴在线一区二区三区| 欧美一区二区三区白人| 天天综合天天做天天综合| 欧美性猛交xxxx黑人交| 一区二区三区电影在线播| 99re成人精品视频| 亚洲欧美激情一区二区| 色综合激情久久| 亚洲婷婷综合色高清在线| 91污在线观看| 亚洲女人小视频在线观看| 91网站最新地址| 国产成人亚洲综合色影视| 日韩经典中文字幕一区| 一区二区高清在线| 午夜精品福利一区二区三区蜜桃| 在线观看日韩电影| 亚洲成人www| 7777精品伊人久久久大香线蕉| 午夜日韩在线电影| 91.xcao| 日本成人在线看| 欧美一区二区三区精品| 激情综合五月天| 国产亚洲欧洲一区高清在线观看| 粉嫩高潮美女一区二区三区| 亚洲国产高清在线观看视频| 92精品国产成人观看免费| 亚洲综合一区在线| 欧美日韩精品一区二区三区 | 这里是久久伊人| 久久国产生活片100| 久久这里只精品最新地址| 成人久久18免费网站麻豆| 《视频一区视频二区| 在线一区二区观看| 奇米在线7777在线精品| 国产三级一区二区三区| 92精品国产成人观看免费 | 亚洲成av人片在线| 日韩欧美第一区| 成人午夜电影久久影院| 综合久久综合久久| 欧美精品久久一区| 国产精品1区二区.| 亚洲精品国产一区二区三区四区在线| 欧美日韩国产高清一区| 国产美女在线观看一区| 亚洲最大成人综合| 欧美大片日本大片免费观看| 99久久国产综合精品女不卡| 日韩精品亚洲一区| 久久免费偷拍视频| 日本高清成人免费播放| 国内外精品视频| 亚洲精品成人天堂一二三| 欧美本精品男人aⅴ天堂| 91无套直看片红桃| 精品污污网站免费看| 国产精品亚洲一区二区三区妖精| 亚洲午夜精品网| 国产蜜臀97一区二区三区| 色婷婷久久综合| 国产原创一区二区三区| 一区二区成人在线视频 | √…a在线天堂一区| 日韩一区二区三区视频在线| 99久久伊人久久99| 久久av资源站| 一区二区三区日本| 久久精品人人做人人综合| 91精品国产综合久久蜜臀| 色婷婷av一区二区| 国产精品18久久久久久久久久久久 | 蜜臀久久99精品久久久画质超高清 | 日韩一二三四区| 色婷婷一区二区三区四区|