<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    gr8vyguy@Blogjava

    我的作品: 掃雷游戲

    掃雷是一款最經(jīng)典的休閑益智小游戲之一,也許Windows最初包含它的目的是為了讓用戶練習鼠標操作。曾經(jīng) 為了破記錄,和幾個朋友一起瘋狂地玩掃雷,甚至總結出了像"一二一"這樣實用的口訣。高級模式下,本人的最高記錄可是120多秒阿。

    做一款曾經(jīng)非常喜歡的游戲,是一件很有成就感的事情,更有趣的是還做得幾乎一模一樣。

    先看張圖吧

    很像吧?是用Java+SWT寫的。所以不局限于Windows系統(tǒng),再看一張Linux下的圖片,也很漂亮,

    Java Web Start地址
        http://daoenpan.googlepages.com/minesweeper.jnlp

    這個程序麻雀雖小,卻也五臟俱全,在這款游戲里用到了Java的很多方面,包括I18N國際化,C11N個性化,自定義SWT控件,SWT的資源管理等等,是一個學習Java編程非常好的例子。

    在程序開發(fā)過程中,使用了單元測試JUnit,程序發(fā)布方面使用了Ant腳本和Proguard混淆壓縮器,特別值得一提的是,Windows下的 發(fā)布程序利用了JDK的pack200,使得整個程序包從2M多減到900多K。在第一次運行的時候啟動程序會自動調用unpack200解開壓縮的Jar 包,這時會出現(xiàn)幾個DOS窗口,但是這只發(fā)生在第一次運行的時候。

    雖然我做的這個掃雷有幾個Windows自帶的那個掃雷沒有的功能,比如支持多種語言作弊功能,但是我覺得,只提供可運行程序沒有太大的意義。所 以我提供了所有的Java源代碼,以供感興趣的朋友下載。作為軟件,錯誤是難免,請朋友們將發(fā)現(xiàn)的錯誤告之我,你可以通過點擊幫 助菜單的About對話框里我的Email鏈接給我發(fā)Email,非常感謝。

    作弊


    下載

    Windows下可執(zhí)行程序包:  Minesweeper.zip  ,解壓后,雙擊Minesweeper.exe運行程序,需要JRE 1.4+,如果你需要其他系統(tǒng)的可執(zhí)行程序包,請來信聯(lián)系,或者你可以編譯下面的源代碼。

    Java源代碼 minesweeper_src.zip ,不包括所用的SWT和log4j包。

    如果你要運行源碼包里的build.xml, 還需要把minesweeper_supports.zip里的supports目錄拷到你的項目目錄下。

    最后要說是,加拿大心理學家PiersSteel在他的報告里, 對這款最平常的Windows小游戲感慨道, “人們在掃雷游戲上花費的時間, 可以為這個社會創(chuàng)造數(shù)十億美元的財富。” 自從做了這款游戲,特別是在加上作弊功能后,就再也沒有興趣長時間的玩了。

    更多的截圖 http://www.tkk7.com/xilaile/archive/2007/04/25/113648.html

    掃雷相關的鏈接

            Windows小游戲之掃雷世界紀錄到底多快

    posted on 2007-04-20 22:34 gr8vyguy 閱讀(6306) 評論(14)  編輯  收藏 所屬分類: 我的作品

    評論

    # re: 我的作品: 掃雷游戲 2007-04-21 03:50 英明

    關于ant文件中的proguard工程創(chuàng)建,想知道怎么創(chuàng)建的,我導入你的源碼,但會有錯誤,在構建ant的時候  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-04-21 07:43 pande

    @英明
    請再下載minesweeper_supports.zip。另外要把swt.jar和log4j-1.2.14.jar加到你的項目Classpath里  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-04-21 13:01 xx

    Main Class Error:Jars NOT Found  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-04-21 13:26 Pande

    @xx
    請問你的操作系統(tǒng)和JRE是哪個版本的?  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-04-21 15:48 xx

    xp java1.5update6  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-04-21 16:11 Pande

    @xx
    由于我是用JDK6編譯的,所以1.5update6不能運行
    一會,我重新上載一個JDK1.4編譯的,應該就可以了  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-04-21 16:39 Pande

    @xx
    已經(jīng)更新,請重新下載Minesweeper.zip,現(xiàn)在支持所有Java1.4+  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-05-02 08:56 ddd

    老大, minesweeper不是你原創(chuàng)的吧。。

    記得這個是eclipse里的一個plugin,

    如果是你從頭一句行寫出來的話,你做的那個抓圖軟件就太太簡單了。。。  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-05-02 10:09 Pande

    @ddd
    你好, minesweeper這個游戲當然不是我原創(chuàng)的,據(jù)說上世紀70年代就有了, 但是上面的程序確是我原創(chuàng)的,從零寫起的。  回復  更多評論   

    # re: 我的作品: 掃雷游戲[未登錄] 2007-05-18 08:59 Michael

    下載了看了一下,很不錯,正在研究之中,謝謝!  回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-06-08 08:47 再倒

    為什么倒入swt.jar和log4j.1.2.14.jar后還有錯誤 ?????
    嚴重性 描述 資源 所在文件夾 位置 創(chuàng)建時間
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 115 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 116 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/ well10/src/cn/pandaoen/game/minesweeper 第 119 行pandaoen/game/minesweeper 第 117 行 2007年6月8日   回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-06-08 08:48 再倒

    為什么倒入swt.jar和log4j.1.2.14.jar后還有錯誤 ?????
    嚴重性 描述 資源 所在文件夾 位置 創(chuàng)建時間
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 115 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 116 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 117 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 119 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 120 行 2007年6月8日 15:37:34
    2 imageCache cannot be resolved Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 39 行 2007年6月8日 15:37:33
    2 imageCache cannot be resolved Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 47 行 2007年6月8日 15:37:33
    2 Link cannot be resolved (or is not a valid type) for the field AboutDialog.emailLink AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 31 行 2007年6月8日 15:37:34
    2 Link cannot be resolved (or is not a valid type) for the field AboutDialog.linkWeb AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 30 行 2007年6月8日 15:37:34
    2 Link cannot be resolved or is not a type AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 105 行 2007年6月8日 15:37:34
    2 Link cannot be resolved or is not a type AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 115 行 2007年6月8日 15:37:34
    2 linkWeb cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 105 行 2007年6月8日 15:37:34
    2 linkWeb cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 106 行 2007年6月8日 15:37:34
    2 linkWeb cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 107 行 2007年6月8日 15:37:34
    2 linkWeb cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 109 行 2007年6月8日 15:37:34
    2 linkWeb cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 110 行 2007年6月8日 15:37:34
    2 Syntax error on token ":", ; expected Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 88 行 2007年6月8日 15:37:33
    2 Syntax error on token "(", invalid Expression Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 31 行 2007年6月8日 15:37:33
    2 Syntax error on token "(", invalid Expression LedDigit.java well10/src/cn/pandaoen/widget/swt 第 101 行 2007年6月8日 15:37:33
    2 Syntax error on token "(", invalid Expression LedDigit.java well10/src/cn/pandaoen/widget/swt 第 145 行 2007年6月8日 15:37:33
    2 Syntax error on token ")", ; expected after this token Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 88 行 2007年6月8日 15:37:33
    2 Syntax error on tokens, delete these tokens LedDigit.java well10/src/cn/pandaoen/widget/swt 第 26 行 2007年6月8日 15:37:33
    1 The import cn.pandaoen.game.minesweeper.res.Resources is never used MineSweeperListener.java well10/src/cn/pandaoen/game/minesweeper/actions 第 13 行 2007年6月8日 15:37:33
    2 The import org.eclipse.swt.graphics.Transform cannot be resolved LedDigit.java well10/src/cn/pandaoen/widget/swt 第 12 行 2007年6月8日 15:37:33
    1 The import org.eclipse.swt.layout.FillLayout is never used AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 9 行 2007年6月8日 15:37:34
    1 The import org.eclipse.swt.layout.GridData is never used AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 10 行 2007年6月8日 15:37:34
    1 The import org.eclipse.swt.layout.GridLayout is never used AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 11 行 2007年6月8日 15:37:34
    1 The import org.eclipse.swt.SWT is never used MineSweeperListener.java well10/src/cn/pandaoen/game/minesweeper/actions 第 5 行 2007年6月8日 15:37:33
    2 The import org.eclipse.swt.widgets.Link cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 18 行 2007年6月8日 15:37:34
    1 The import org.eclipse.swt.widgets.MessageBox is never used MineSweeperListener.java well10/src/cn/pandaoen/game/minesweeper/actions 第 8 行 2007年6月8日 15:37:33
      回復  更多評論   

    # re: 我的作品: 掃雷游戲 2007-06-08 08:50 再倒

    為什么倒入swt.jar和log4j.1.2.14.jar后還有錯誤 ?????
    嚴重性 描述 資源 所在文件夾 位置 創(chuàng)建時間
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 115 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 116 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 117 行 2007年6月8日 15:37:34
    2 emailLink cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 119 行 2007年6月8日 15:37:34
    2 Syntax error on token ":", ; expected Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 88 行 2007年6月8日 15:37:33
    2 Syntax error on token "(", invalid Expression Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 31 行 2007年6月8日 15:37:33
    2 Syntax error on token "(", invalid Expression LedDigit.java well10/src/cn/pandaoen/widget/swt 第 101 行 2007年6月8日 15:37:33
    2 Syntax error on token "(", invalid Expression LedDigit.java well10/src/cn/pandaoen/widget/swt 第 145 行 2007年6月8日 15:37:33
    2 Syntax error on token ")", ; expected after this token Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 88 行 2007年6月8日 15:37:33
    2 Syntax error on token ")", invalid AssignmentOperator LedDigit.java well10/src/cn/pandaoen/widget/swt 第 167 行 2007年6月8日 15:37:33
    2 Syntax error on token "<", ( expected Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 31 行 2007年6月8日 15:37:33
    2 Syntax error on token "<", ( expected LedDigit.java well10/src/cn/pandaoen/widget/swt 第 101 行 2007年6月8日 15:37:33
    2 Syntax error on token "<", ( expected LedDigit.java well10/src/cn/pandaoen/widget/swt 第 145 行 2007年6月8日 15:37:33
    2 Syntax error on token "<", delete this token Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 31 行 2007年6月8日 15:37:33
    2 Syntax error on token ">", , expected Resources.java well10/src/cn/pandaoen/game/minesweeper/res 第 31 行 2007年6月8日 15:37:33
    2 Syntax error on token(s), misplaced construct(s) LedDigit.java well10/src/cn/pandaoen/widget/swt 第 167 行 2007年6月8日 15:37:33
    2 Syntax error on tokens, delete these tokens BestTimeDialog.java well10/src/cn/pandaoen/game/minesweeper 第 102 行 2007年6月8日 15:37:34
    2 Syntax error on tokens, delete these tokens Counter.java well10/src/cn/pandaoen/game/minesweeper 第 79 行 2007年6月8日 15:37:34
    2 Syntax error on tokens, delete these tokens MineSweeper.java well10/src/cn/pandaoen/game/minesweeper 第 265 行 2007年6月8日 15:37:34
    2 Syntax error on tokens, delete these tokens NameInputDialog.java well10/src/cn/pandaoen/game/minesweeper 第 40 行 2007年6月8日 15:37:34
    2 Syntax error on tokens, delete these tokens Timer.java well10/src/cn/pandaoen/game/minesweeper 第 72 行 2007年6月8日 15:37:33
    2 Syntax error on tokens, delete these tokens LangChangeListener.java well10/src/cn/pandaoen/game/minesweeper/actions 第 23 行 2007年6月8日 15:37:33
    2 Syntax error on tokens, delete these tokens ModeChangeListener.java well10/src/cn/pandaoen/game/minesweeper/actions 第 24 行 2007年6月8日 15:37:33
    2 Syntax error on tokens, delete these tokens LedDigit.java well10/src/cn/pandaoen/widget/swt 第 26 行 2007年6月8日 15:37:33
    1 The import cn.pandaoen.game.minesweeper.res.Resources is never used MineSweeperListener.java well10/src/cn/pandaoen/game/minesweeper/actions 第 13 行 2007年6月8日 15:37:33
    2 The import org.eclipse.swt.graphics.Transform cannot be resolved LedDigit.java well10/src/cn/pandaoen/widget/swt 第 12 行 2007年6月8日 15:37:33
    1 The import org.eclipse.swt.layout.FillLayout is never used AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 9 行 2007年6月8日 15:37:34
    1 The import org.eclipse.swt.layout.GridData is never used AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 10 行 2007年6月8日 15:37:34
    1 The import org.eclipse.swt.layout.GridLayout is never used AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 11 行 2007年6月8日 15:37:34
    1 The import org.eclipse.swt.SWT is never used MineSweeperListener.java well10/src/cn/pandaoen/game/minesweeper/actions 第 5 行 2007年6月8日 15:37:33
    2 The import org.eclipse.swt.widgets.Link cannot be resolved AboutDialog.java well10/src/cn/pandaoen/game/minesweeper 第 18 行 2007年6月8日 15:37:34
    1 The import org.eclipse.swt.widgets.MessageBox is never used MineSweeperListener.java well10/src/cn/pandaoen/game/minesweeper/actions 第 8 行 2007年6月8日 15:37:33
      回復  更多評論   

    # re: 我的作品: 掃雷游戲[未登錄] 2007-10-22 03:34 Owen

    我已經(jīng)導入 eclipse 并且編譯運行成功了。
    看樣子是要把 log4j 和 SWT 兩個 jar 文件放到項目根目錄下的 \libs 里面。

    但是運行后,和 windows 的掃雷相比,少了一個左右鍵雙擊某個方塊時,根據(jù)已經(jīng)探索的情況打開附近 8 個方塊的功能。

    描述的不是很清除,試試 windows 的掃雷看看。

    我是一個初學者,等我學到一定程度,也會自己嘗試寫一個 mineSweeper 的。:)  回復  更多評論   


    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導航:
     
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    導航

    統(tǒng)計

    公告

  • 轉載請注明出處.
  • msn: gr8vyguy at live.com
  • 常用鏈接

    留言簿(9)

    隨筆分類(68)

    隨筆檔案(80)

    文章分類(1)

    My Open Source Projects

    搜索

    積分與排名

    最新評論

    主站蜘蛛池模板: 黄页网站免费在线观看| 国产一区二区免费视频| 国产乱码免费卡1卡二卡3卡| 久久综合亚洲鲁鲁五月天| 国产精品白浆在线观看免费 | 毛片a级毛片免费观看免下载| 亚洲视频在线观看一区| 99在线热视频只有精品免费| 久久精品亚洲综合一品| 久久国产高潮流白浆免费观看| 内射干少妇亚洲69XXX| 1000部拍拍拍18勿入免费视频软件| 337p日本欧洲亚洲大胆色噜噜| 永久在线免费观看| 亚洲伊人久久大香线蕉结合| 成人激情免费视频| 免费的黄色网页在线免费观看| 亚洲综合在线另类色区奇米| 少妇性饥渴无码A区免费| 久久久亚洲精品视频| 免费看黄视频网站| 亚洲精品无码少妇30P| 亚洲国产成人VA在线观看| 好男人资源在线WWW免费 | 免费在线视频一区| 久久一区二区三区免费| 日韩亚洲Av人人夜夜澡人人爽| 24小时日本在线www免费的| 国产区图片区小说区亚洲区| 国产亚洲人成网站在线观看不卡| 亚洲三级在线免费观看| 美国毛片亚洲社区在线观看| 伊人久久大香线蕉亚洲五月天| h在线观看视频免费网站| 国产精品亚洲一区二区在线观看| 中文亚洲AV片在线观看不卡| 五月婷婷综合免费| 人妻免费久久久久久久了| 亚洲精品美女在线观看播放| 成人免费视频国产| 无码少妇精品一区二区免费动态 |