forked from External/mage
GUI, table: added drafts with single multiplayer and multiple 1vs1 games support (#13701)
- new tourney's single game mode allow to play tourneys/drafts with all players in one game without multiple rounds; - it's allow to setup classic drafts with 1 vs 1 games and multiple rounds - added AI opponents supported including draft bots from a public servers;
This commit is contained in:
parent
a61851db09
commit
f2826cc676
22 changed files with 247 additions and 256 deletions
|
|
@ -1694,13 +1694,13 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
DeckCardLists testDeck = DeckImporter.importDeckFromFile(testDeckFile, false);
|
||||
|
||||
PlayerType aiType = useMonteCarloAI ? PlayerType.COMPUTER_MONTE_CARLO : PlayerType.COMPUTER_MAD;
|
||||
int numSeats = gameName.contains("2") || gameName.contains("Monte Carlo") ? 2 : 4;
|
||||
boolean multiPlayer = numSeats > 2;
|
||||
int numPlayers = gameName.contains("2") || gameName.contains("Monte Carlo") ? 2 : 4;
|
||||
boolean multiPlayer = numPlayers > 2;
|
||||
|
||||
MatchOptions options = new MatchOptions(gameName, gameType, multiPlayer, numSeats);
|
||||
MatchOptions options = new MatchOptions(gameName, gameType, multiPlayer);
|
||||
options.getPlayerTypes().add(PlayerType.HUMAN);
|
||||
options.getPlayerTypes().add(aiType);
|
||||
for (int i=2 ; i < numSeats ; i++) {
|
||||
for (int i=2 ; i < numPlayers ; i++) {
|
||||
options.getPlayerTypes().add(aiType);
|
||||
}
|
||||
options.setDeckType("Variant Magic - Freeform Commander");
|
||||
|
|
@ -1720,7 +1720,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
|
||||
SessionHandler.joinTable(roomId, table.getTableId(), "Human", PlayerType.HUMAN, 1, testDeck, "");
|
||||
SessionHandler.joinTable(roomId, table.getTableId(), "Computer", aiType, 1, testDeck, "");
|
||||
for (int i=2 ; i < numSeats ; i++) {
|
||||
for (int i=2 ; i < numPlayers ; i++) {
|
||||
SessionHandler.joinTable(roomId, table.getTableId(), "Computer" + i, aiType, 1, testDeck, "");
|
||||
}
|
||||
SessionHandler.startMatch(roomId, table.getTableId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue