📄 memory.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 + -