Examples of GameInfo


Examples of org.kaminoite.ranka.kido.ipad.tools.go.specification.structure.GameInfo

    public GameTree(int boardSize, Komi komi, ConstPointList handicap,
                    String rules, TimeSettings timeSettings)
    {
        m_boardSize = boardSize;
        m_root = new Node();
        GameInfo info = m_root.createGameInfo();
        setDate();
        info.setKomi(komi);
        info.set(StringInfo.RULES, rules);
        if (timeSettings != null)
            info.setTimeSettings(timeSettings);
        if (handicap != null)
        {
            info.setHandicap(handicap.size());
            if (handicap.size() > 0)
            {
                m_root.addStones(BLACK, handicap);
                m_root.setPlayer(WHITE);
            }
View Full Code Here

Examples of org.kaminoite.ranka.kido.ipad.tools.go.specification.structure.GameInfo

        Calendar cal = Calendar.getInstance();
        int year = cal.get(Calendar.YEAR);
        int month = cal.get(Calendar.MONTH) + 1;
        int day = cal.get(Calendar.DAY_OF_MONTH);
        DecimalFormat format = new DecimalFormat("00");
        GameInfo info = m_root.getGameInfo();
        info.set(StringInfo.DATE,
                 Integer.toString(year) + "-" + format.format(month) + "-"
                 + format.format(day));
    }
View Full Code Here

Examples of org.terasology.rendering.nui.layers.mainMenu.savedGames.GameInfo

        });

        WidgetUtil.trySubscribe(this, "load", new ActivateEventListener() {
            @Override
            public void onActivated(UIWidget button) {
                GameInfo gameInfo = gameList.getSelection();
                if (gameInfo != null) {
                    loadGame(gameInfo);
                }
            }
        });

        WidgetUtil.trySubscribe(this, "delete", new ActivateEventListener() {
            @Override
            public void onActivated(UIWidget button) {
                GameInfo gameInfo = gameList.getSelection();
                if (gameInfo != null) {
                    Path world = PathManager.getInstance().getSavePath(gameInfo.getManifest().getTitle());
                    try {
                        FilesUtil.recursiveDelete(world);
                        gameList.getList().remove(gameInfo);
                        gameList.setSelection(null);
                    } catch (Exception e) {
View Full Code Here

Examples of org.terasology.rendering.nui.layers.mainMenu.savedGames.GameInfo

            }
        }
    }

    private static GameManifest getLatestGameManifest() {
        GameInfo latestGame = null;
        List<GameInfo> savedGames = GameProvider.getSavedGames();
        for (GameInfo savedGame : savedGames) {
            if (latestGame == null || savedGame.getTimestamp().after(latestGame.getTimestamp())) {
                latestGame = savedGame;
            }
        }

        if (latestGame == null) {
            return null;
        }

        return latestGame.getManifest();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.