Search in sources :

Example 1 with Leelaz

use of wagner.stephanie.lizzie.analysis.Leelaz in project lizzie by featurecat.

the class Lizzie method main.

/**
 * Launches the game window, and runs the game.
 */
public static void main(String[] args) throws IOException, JSONException {
    config = new Config();
    leelaz = new Leelaz();
    leelaz.togglePonder();
    board = new Board();
    frame = new LizzieFrame();
}
Also used : Board(wagner.stephanie.lizzie.rules.Board) Leelaz(wagner.stephanie.lizzie.analysis.Leelaz) LizzieFrame(wagner.stephanie.lizzie.gui.LizzieFrame)

Example 2 with Leelaz

use of wagner.stephanie.lizzie.analysis.Leelaz in project mylizzie by aerisnju.

the class Lizzie method main.

/**
 * Launches the game window, and runs the game.
 */
public static void main(String[] args) throws IOException {
    // Cleanup for misc executor
    Runtime.getRuntime().addShutdownHook(new Thread(() -> ThreadPoolUtil.shutdownAndAwaitTermination(Lizzie.miscExecutor)));
    // Use Nimbus look and feel which looks better
    try {
        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (Exception e) {
    // If Nimbus is not available, you can set the GUI to another look and feel.
    }
    leelaz = new Leelaz(optionSetting.getLeelazCommandLine());
    leelaz.ponder();
    board = new Board();
    frame = new LizzieFrame();
    analysisDialog = AnalysisFrame.createAnalysisDialog(frame);
    analysisFrame = (AnalysisFrame) analysisDialog.getContentPane();
    optionDialog = new OptionDialog(frame);
    optionDialog.setDialogSetting(optionSetting);
    winrateHistogramDialog = new WinrateHistogramDialog(frame);
    setGuiPosition();
    analysisDialog.setVisible(optionSetting.isAnalysisWindowShow());
    winrateHistogramDialog.setVisible(optionSetting.isWinrateHistogramWindowShow());
}
Also used : LookAndFeelInfo(javax.swing.UIManager.LookAndFeelInfo) Leelaz(wagner.stephanie.lizzie.analysis.Leelaz)

Aggregations

Leelaz (wagner.stephanie.lizzie.analysis.Leelaz)2 LookAndFeelInfo (javax.swing.UIManager.LookAndFeelInfo)1 LizzieFrame (wagner.stephanie.lizzie.gui.LizzieFrame)1 Board (wagner.stephanie.lizzie.rules.Board)1