public void playMatch(TournamentPairing pair) { options.getMatchOptions().getPlayerTypes().clear(); options.getMatchOptions().getPlayerTypes().add(pair.getPlayer1().getPlayerType()); options.getMatchOptions().getPlayerTypes().add(pair.getPlayer2().getPlayerType()); tableEventSource.fireTableEvent(EventType.START_MATCH, pair, options.getMatchOptions()); }
private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOKActionPerformed GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem(); MatchOptions options = new MatchOptions(this.txtName.getText(), gameType.getName(), false, 2); options.getPlayerTypes().add(PlayerType.HUMAN); for (TablePlayerPanel player : players) { options.getPlayerTypes().add(player.getPlayerType());
options.getPlayerTypes().add(PlayerType.HUMAN); options.getPlayerTypes().add(PlayerType.COMPUTER_MAD); options.setDeckType("Limited"); options.setAttackOption(MultiplayerAttackOption.LEFT);
public TableController(UUID roomId, UUID userId, MatchOptions options) { this.userId = userId; this.options = options; match = GameFactory.instance.createMatch(options.getGameType(), options); if (userId != null) { Optional<User> user = UserManager.instance.getUser(userId); // TODO: Handle if user == null controllerName = user.map(User::getName).orElse("undefined"); } else { controllerName = "System"; } table = new Table(roomId, options.getGameType(), options.getName(), controllerName, DeckValidatorFactory.instance.createDeckValidator(options.getDeckType()), options.getPlayerTypes(), TableRecorderImpl.instance, match, options.getBannedUsers(), options.isPlaneChase()); chatId = ChatManager.instance.createChatSession("Match Table " + table.getId()); init(); }
if (matchOptions != null && event.getMultiplayerRound() != null) { for (TournamentPlayer player : event.getMultiplayerRound().getAllPlayers()) { matchOptions.getPlayerTypes().add(player.getPlayerType());