memory.java
来自「玩儿地雷游戏 猜字母 连续点击的两个字母相同则翻开 不同则全都盖上重新来 直到把」· Java 代码 · 共 53 行
JAVA
53 行
/**
* 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 + =
减小字号Ctrl + -
显示快捷键?