Package mage.interfaces

Examples of mage.interfaces.Action


        });
    }

    @Override
    public void sendPlayerAction(final PlayerAction playerAction, final UUID gameId, final String sessionId) throws MageException {
        execute("setdPlayerAction", sessionId, new Action() {
            @Override
            public void execute() {
                Session session = SessionManager.getInstance().getSession(sessionId);
                if (session == null) {
                    logger.error("Session not found sessionId: "+ sessionId + "  gameId:" + gameId);
View Full Code Here


        });
    }

    @Override
    public void watchGame(final UUID gameId, final String sessionId) throws MageException {
        execute("watchGame", sessionId, new Action() {
            @Override
            public void execute() {
                UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                GameManager.getInstance().watchGame(gameId, userId);
            }
View Full Code Here

        });
    }

    @Override
    public void stopWatching(final UUID gameId, final String sessionId) throws MageException {
        execute("stopWatching", sessionId, new Action() {
            @Override
            public void execute() {
                UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                User user = UserManager.getInstance().getUser(userId);
                if (user != null) {
View Full Code Here

        });
    }

    @Override
    public void replayGame(final UUID gameId, final String sessionId) throws MageException {
        execute("replayGame", sessionId, new Action() {
            @Override
            public void execute() {
                UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                ReplayManager.getInstance().replayGame(gameId, userId);
            }
View Full Code Here

        });
    }

    @Override
    public void startReplay(final UUID gameId, final String sessionId) throws MageException {
        execute("startReplay", sessionId, new Action() {
            @Override
            public void execute() {
                UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                ReplayManager.getInstance().startReplay(gameId, userId);
            }
View Full Code Here

        });
    }

    @Override
    public void stopReplay(final UUID gameId, final String sessionId) throws MageException {
        execute("stopReplay", sessionId, new Action() {
            @Override
            public void execute() {
                UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                ReplayManager.getInstance().stopReplay(gameId, userId);
            }
View Full Code Here

        });
    }

    @Override
    public void nextPlay(final UUID gameId, final String sessionId) throws MageException {
        execute("nextPlay", sessionId, new Action() {
            @Override
            public void execute() {
                UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                ReplayManager.getInstance().nextPlay(gameId, userId);
            }
View Full Code Here

        });
    }

    @Override
    public void previousPlay(final UUID gameId, final String sessionId) throws MageException {
        execute("previousPlay", sessionId, new Action() {
            @Override
            public void execute() {
                UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                ReplayManager.getInstance().previousPlay(gameId, userId);
            }
View Full Code Here

        });
    }

    @Override
    public void skipForward(final UUID gameId, final String sessionId, final int moves) throws MageException {
        execute("skipForward", sessionId, new Action() {
            @Override
            public void execute() {
                UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                ReplayManager.getInstance().skipForward(gameId, userId, moves);
            }
View Full Code Here

        return null;
    }

    @Override
    public void cheat(final UUID gameId, final String sessionId, final UUID playerId, final DeckCardLists deckList) throws MageException {
        execute("cheat", sessionId, new Action() {
            @Override
            public void execute() {
                if (testMode) {
                    UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
                    GameManager.getInstance().cheat(gameId, userId, playerId, deckList);
View Full Code Here

TOP

Related Classes of mage.interfaces.Action

Copyright © 2018 www.massapicom. 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.