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

📄 qipumanager.java

📁 Java编写的小游戏扫雷代码,可以在多种环境下运行
💻 JAVA
字号:
package org.nebula.games.go;

import java.io.*;

public class QipuManager {
    public static final int SGF = 0;
    public static final int MGT = 1;
    public static final int MAN = 2;
    public static final int XML = 3;

    public static Match readMatchFromFile(String filename, int filetype) {

        if (filename == null) {
            System.out.println("please input one sgf file name");
            return null;
        }

        try {

            FileInputStream fis = new FileInputStream(filename);
            return SgfAdapter.readMatch(fis);
        }
        catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static void saveMatchToFile(Match match, String filename, int filetype) {
        if (filename == null) {
            System.out.println("please input one sgf file name");
            return;
        }

        try {

            FileOutputStream fos = new FileOutputStream(filename);
//            SgfAdapter.writeMatch(match, fos);
            fos.close();
        }
        catch (Exception e) {
            e.printStackTrace();
        }

    }
}

⌨️ 快捷键说明

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