mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
fixed issue 255
This commit is contained in:
parent
abb58c4008
commit
bbb4f8a346
8 changed files with 32 additions and 8 deletions
|
|
@ -312,6 +312,7 @@ public class NewTableDialog extends MageDialog {
|
|||
options.getPlayerTypes().add(player.getPlayerType());
|
||||
}
|
||||
options.setDeckType((String) this.cbDeckType.getSelectedItem());
|
||||
options.setLimited(false);
|
||||
options.setAttackOption((MultiplayerAttackOption) this.cbAttackOption.getSelectedItem());
|
||||
options.setRange((RangeOfInfluence) this.cbRange.getSelectedItem());
|
||||
options.setWinsNeeded((Integer)this.spnNumWins.getValue());
|
||||
|
|
|
|||
|
|
@ -306,6 +306,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
tOptions.getMatchOptions().setWinsNeeded(2);
|
||||
tOptions.getMatchOptions().setAttackOption(MultiplayerAttackOption.LEFT);
|
||||
tOptions.getMatchOptions().setRange(RangeOfInfluence.ALL);
|
||||
tOptions.getMatchOptions().setLimited(true);
|
||||
table = session.createTournamentTable(roomId, tOptions);
|
||||
if (table == null) {
|
||||
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Error creating table.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,10 @@ public class CallbackClientImpl implements CallbackClient {
|
|||
TableClientMessage message = (TableClientMessage) callback.getData();
|
||||
DeckView deckView = message.getDeck();
|
||||
Deck deck = DeckUtil.construct(deckView);
|
||||
sideboard(deck, message.getTableId(), message.getTime());
|
||||
if (message.getFlag())
|
||||
construct(deck, message.getTableId(), message.getTime());
|
||||
else
|
||||
sideboard(deck, message.getTableId(), message.getTime());
|
||||
}
|
||||
else if (callback.getMethod().equals("construct")) {
|
||||
TableClientMessage message = (TableClientMessage) callback.getData();
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
options.setWinsNeeded(1);
|
||||
table = session.createTable(roomId, options);
|
||||
session.joinTable(roomId, table.getTableId(), "Human", "Human", 1, Sets.loadDeck("test.dck"));
|
||||
session.joinTable(roomId, table.getTableId(), "Computer", "Computer - minimax", 1, Sets.loadDeck("test.dck"));
|
||||
session.joinTable(roomId, table.getTableId(), "Computer", "Computer - minimax", 5, Sets.loadDeck("test.dck"));
|
||||
session.startGame(roomId, table.getTableId());
|
||||
} catch (Exception ex) {
|
||||
handleError(ex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue