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

📄 memory.java

📁 玩儿地雷游戏 猜字母 连续点击的两个字母相同则翻开 不同则全都盖上重新来 直到把所有的字母打开
💻 JAVA
字号:
/**
 * Main driver for the Memory game. 
 * 
 * @author Terri Paik
 * @author Zhu Jing
 * StudentID:0631118	
 * Project: 3
 * Date:2009/04/02
 */
 
public class Memory {

    /**
     * Tells the user the proper way to start this program.
     * Do not change this method.
     */
    static void printUsage() {
        System.out.println("Usage: java Memory [-config FILENAME]");
        System.out.println("   FILENAME: File containing configuration settings for this game");
    }


    /**
     * Program starting point.
     */
    public static void main(String[] args) {
        String configFile = null;

        /* TO DO!
         * Check for command line arguments.
         * The only two valid ways to run this program are 
         * 1) No arguments
         * 2) -config FILENAME
         *
         * If the user specified invalid arguments, printUsage() and exit
         * the program.
         *
         * Else if the user specified -config and a file name, set the
         * configFile variable to the file name.
         */

        Game game;
        do {
            if (configFile == null) {	
                game = new Game();
            } else {
                game = new Game(configFile);
            }
            game.play();
        } while (game.keepPlaying());
    }
}

⌨️ 快捷键说明

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