📄 jminesweeper.java
字号:
/*
* Created on Mar 24, 2005
*
TODO to start to program. this program are wrote base on MVC structure
*/
package mqqqvpppm;
import java.io.IOException;
import model.Model;
import model.SaveAndLoad;
import view.UI;
/**
* @author mqqqvpppm
*
* TODO to start to program. this program are wrote base on MVC structure
*/
public class JMineSweeper {
public static void main(String[] args) {
int[] type;
boolean isMenuMarkSelsected;
try {
SaveAndLoad saveAndLoad = new SaveAndLoad(null);
type = saveAndLoad.loadType();
isMenuMarkSelsected = saveAndLoad.loadIsMenuMarkSelected();
saveAndLoad.closeStream();
} catch (IOException e) {
type = new int[4];
type[SaveAndLoad.INDEX_WIDTH] = 9;
type[SaveAndLoad.INDEX_HEIGHT] = 9;
type[SaveAndLoad.INDEX_MINENUMBER] = 10;
type[SaveAndLoad.INDEX_TYPE] = Model.TYPE_EASY;
isMenuMarkSelsected = true;
}
Model model = new Model(type[SaveAndLoad.INDEX_WIDTH],
type[SaveAndLoad.INDEX_HEIGHT],
type[SaveAndLoad.INDEX_MINENUMBER],
type[SaveAndLoad.INDEX_TYPE]);
model.setMenuMarkSelected(isMenuMarkSelsected);
UI ui = new UI(model);
model.addObserver(ui);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -