Package mage.server

Examples of mage.server.TableManager


    }

    private void startMatch(TournamentPairing pair, MatchOptions matchOptions) {
        try {
            TableManager tableManager = TableManager.getInstance();
            Table table = tableManager.createTable(GamesRoomManager.getInstance().getMainRoomId(), matchOptions);
            table.setTournamentSubTable(true);
            table.setTournament(tournament);
            table.setState(TableState.WAITING);
            TournamentPlayer player1 = pair.getPlayer1();
            TournamentPlayer player2 = pair.getPlayer2();
            tableManager.addPlayer(getPlayerUserId(player1.getPlayer().getId()), table.getId(), player1.getPlayer(), player1.getPlayerType(), player1.getDeck());
            tableManager.addPlayer(getPlayerUserId(player2.getPlayer().getId()), table.getId(), player2.getPlayer(), player2.getPlayerType(), player2.getDeck());
            table.setState(TableState.STARTING);
            tableManager.startTournamentSubMatch(null, table.getId());
            Match match = tableManager.getMatch(table.getId());
            match.setTableId(tableId);
            pair.setMatch(match);
            pair.setTableId(table.getId());
            player1.setState(TournamentPlayerState.DUELING);
            player2.setState(TournamentPlayerState.DUELING);
View Full Code Here

TOP

Related Classes of mage.server.TableManager

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.