| Chunk |
|---|
| Conflicting content |
|---|
import org.mage.card.arcane.CardPanel; import org.mage.plugins.card.images.ImageCache; <<<<<<< HEAD import javax.swing.*; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseWheelEvent; import java.awt.image.BufferedImage; import java.util.*; import java.util.List; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import org.mage.network.Client; ======= >>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629 /** * Class that handles the callbacks from the card panels to mage to display big * card images from the cards the mouse hovers on. Also handles tooltip text |
| Solution content |
|---|
import org.mage.card.arcane.CardPanel; import org.mage.plugins.card.images.ImageCache; import javax.swing.*; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseWheelEvent; import java.awt.image.BufferedImage; import java.util.*; import java.util.List; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import org.mage.network.Client; /** * Class that handles the callbacks from the card panels to mage to display big * card images from the cards the mouse hovers on. Also handles tooltip text |
| File |
|---|
| MageActionCallback.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
break;
case "Remove":
if (JOptionPane.showConfirmDialog(null, "Are you sure you want to remove table?", "Removing table", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
<<<<<<< HEAD
client.removeTable(roomId, tableId);
}
=======
session.removeTable(roomId, tableId);
}
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
break;
case "Show":
if (isTournament) { |
| Solution content |
|---|
break;
case "Remove":
if (JOptionPane.showConfirmDialog(null, "Are you sure you want to remove table?", "Removing table", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
client.removeTable(roomId, tableId);
}
break;
case "Show":
if (isTournament) { |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
case "Show":
if (isTournament) {
logger.info("Showing tournament table " + tableId);
<<<<<<< HEAD
client.watchTable(roomId, tableId);
}
=======
session.watchTable(roomId, tableId);
}
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
break;
case "Watch":
if (!isTournament) { |
| Solution content |
|---|
case "Show":
if (isTournament) {
logger.info("Showing tournament table " + tableId);
client.watchTable(roomId, tableId);
}
break;
case "Watch":
if (!isTournament) { |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
case "Watch":
if (!isTournament) {
logger.info("Watching table " + tableId);
<<<<<<< HEAD
client.watchTable(roomId, tableId);
}
=======
session.watchTable(roomId, tableId);
}
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
break;
case "Replay":
logger.info("Replaying game " + gameId); |
| Solution content |
|---|
case "Watch":
if (!isTournament) {
logger.info("Watching table " + tableId);
client.watchTable(roomId, tableId);
}
break;
case "Replay":
logger.info("Replaying game " + gameId); |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
List |
| Solution content |
|---|
List |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
case "Show":;
if (matchesModel.isTournament(modelRow)) {
logger.info("Showing tournament table " + matchesModel.getTableId(modelRow));
<<<<<<< HEAD
client.watchTable(roomId, matchesModel.getTableId(modelRow));
}
=======
session.watchTable(roomId, matchesModel.getTableId(modelRow));
}
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
break;
}
} |
| Solution content |
|---|
case "Show":;
if (matchesModel.isTournament(modelRow)) {
logger.info("Showing tournament table " + matchesModel.getTableId(modelRow));
client.watchTable(roomId, matchesModel.getTableId(modelRow));
}
break;
}
} |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
public void startTasks() {
<<<<<<< HEAD
if (client != null) {
if (updateRoomTask == null || updateRoomTask.isDone()) {
updateRoomTask = new UpdateRoomTask(client, roomId, this, this.chatPanel);
updateRoomTask.execute();
=======
if (session != null) {
if (updateTablesTask == null || updateTablesTask.isDone()) {
updateTablesTask = new UpdateTablesTask(session, roomId, this);
updateTablesTask.execute();
}
if (updatePlayersTask == null || updatePlayersTask.isDone()) {
updatePlayersTask = new UpdatePlayersTask(session, roomId, this.chatPanel);
updatePlayersTask.execute();
}
if (this.btnStateFinished.isSelected()) {
if (updateMatchesTask == null || updateMatchesTask.isDone()) {
updateMatchesTask = new UpdateMatchesTask(session, roomId, this);
updateMatchesTask.execute();
}
} else {
if (updateMatchesTask != null) {
updateMatchesTask.cancel(true);
}
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
}
// if (updatePlayersTask == null || updatePlayersTask.isDone()) {
// updatePlayersTask = new UpdatePlayersTask(client, roomId, this.chatPanel); |
| Solution content |
|---|
}
public void startTasks() {
if (client != null) {
if (updateRoomTask == null || updateRoomTask.isDone()) {
updateRoomTask = new UpdateRoomTask(client, roomId, this, this.chatPanel);
updateRoomTask.execute();
}
// if (updatePlayersTask == null || updatePlayersTask.isDone()) {
// updatePlayersTask = new UpdatePlayersTask(client, roomId, this.chatPanel); |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}//GEN-LAST:event_btnNewTournamentActionPerformed
private void btnQuickStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuickStartActionPerformed
<<<<<<< HEAD
TableView table;
try {
File f = new File("test.dck");
if (!f.exists()) {
JOptionPane.showMessageDialog(null, "Couldn't find test.dck file for quick game start", "Error", JOptionPane.ERROR_MESSAGE);
return;
}
MatchOptions options = new MatchOptions("1", "Two Player Duel");
options.getPlayerTypes().add("Human");
options.getPlayerTypes().add("Computer - mad");
options.setDeckType("Limited");
options.setAttackOption(MultiplayerAttackOption.LEFT);
options.setRange(RangeOfInfluence.ALL);
options.setWinsNeeded(1);
options.setMatchTimeLimit(MatchTimeLimit.NONE);
options.setFreeMulligans(2);
options.setSkillLevel(SkillLevel.CASUAL);
options.setRollbackTurnsAllowed(true);
table = client.createTable(roomId, options);
client.joinTable(roomId, table.getTableId(), "Human", "Human", 1, DeckImporterUtil.importDeck("test.dck"),"");
client.joinTable(roomId, table.getTableId(), "Computer", "Computer - mad", 5, DeckImporterUtil.importDeck("test.dck"),"");
client.startMatch(roomId, table.getTableId());
} catch (HeadlessException ex) {
handleError(ex);
=======
TableView table;
try {
File f = new File("test.dck");
if (!f.exists()) {
JOptionPane.showMessageDialog(null, "Couldn't find test.dck file for quick game start", "Error", JOptionPane.ERROR_MESSAGE);
return;
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
}
MatchOptions options = new MatchOptions("1", "Two Player Duel"); |
| Solution content |
|---|
}//GEN-LAST:event_btnNewTournamentActionPerformed
private void btnQuickStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuickStartActionPerformed
TableView table;
try {
File f = new File("test.dck");
if (!f.exists()) {
JOptionPane.showMessageDialog(null, "Couldn't find test.dck file for quick game start", "Error", JOptionPane.ERROR_MESSAGE);
return;
}
MatchOptions options = new MatchOptions("1", "Two Player Duel");
options.getPlayerTypes().add("Human");
options.getPlayerTypes().add("Computer - mad");
options.setDeckType("Limited");
options.setAttackOption(MultiplayerAttackOption.LEFT);
options.setRange(RangeOfInfluence.ALL);
options.setWinsNeeded(1);
options.setMatchTimeLimit(MatchTimeLimit.NONE);
options.setFreeMulligans(2);
options.setSkillLevel(SkillLevel.CASUAL);
options.setRollbackTurnsAllowed(true);
table = client.createTable(roomId, options);
client.joinTable(roomId, table.getTableId(), "Human", "Human", 1, DeckImporterUtil.importDeck("test.dck"),"");
client.joinTable(roomId, table.getTableId(), "Computer", "Computer - mad", 5, DeckImporterUtil.importDeck("test.dck"),"");
client.startMatch(roomId, table.getTableId());
} catch (HeadlessException ex) {
handleError(ex);
} |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Catch clause |
| If statement |
| Method invocation |
| Return statement |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
private static final DateFormat timeFormatter = new SimpleDateFormat("HH:mm:ss");
;
<<<<<<< HEAD
private Client client;
=======
private Session session;
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
public void loadData(Collection |
| Solution content |
|---|
private static final DateFormat timeFormatter = new SimpleDateFormat("HH:mm:ss");
;
private Client client;
public void loadData(Collection |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
return "Show";
} else {
owner = tables[arg0].getControllerName();
<<<<<<< HEAD
if (client != null && owner.equals(client.getUserName())) {
return "";
=======
if (session != null && owner.equals(session.getUserName())) {
return "";
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
}
return "Watch";
} |
| Solution content |
|---|
return "Show";
} else {
owner = tables[arg0].getControllerName();
if (client != null && owner.equals(client.getUserName())) {
return "";
}
return "Watch";
} |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
get();
//
protected void done() {
}
<<<<<<< HEAD
//class UpdatePlayersTask extends SwingWorker |
| Solution content |
|---|
} //class UpdatePlayersTask extends SwingWorker |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Class declaration |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
} <<<<<<< HEAD //class UpdateMatchesTask extends SwingWorker |
| Solution content |
|---|
// this.roomId = roomId; } //class UpdateMatchesTask extends SwingWorker |
| File |
|---|
| TablesPanel.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Class declaration |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
controlledByOwner = false;
}
if (game != null && permanent.getCounters() != null && !permanent.getCounters().isEmpty()) {
<<<<<<< HEAD
counters.clear();
for (Counter counter: permanent.getCounters().values()) {
=======
counters = new ArrayList<>();
for (Counter counter : permanent.getCounters().values()) {
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
counters.add(new CounterView(counter));
}
} |
| Solution content |
|---|
controlledByOwner = false;
}
if (game != null && permanent.getCounters() != null && !permanent.getCounters().isEmpty()) {
counters.clear();
for (Counter counter : permanent.getCounters().values()) {
counters.add(new CounterView(counter));
}
} |
| File |
|---|
| CardView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| For statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
this.loyalty = "";
if (game != null && card.getCounters(game) != null && !card.getCounters(game).isEmpty()) {
<<<<<<< HEAD
counters.clear();
for (Counter counter: card.getCounters(game).values()) {
=======
counters = new ArrayList<>();
for (Counter counter : card.getCounters(game).values()) {
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
counters.add(new CounterView(counter));
}
} |
| Solution content |
|---|
}
this.loyalty = "";
if (game != null && card.getCounters(game) != null && !card.getCounters(game).isEmpty()) {
counters.clear();
for (Counter counter : card.getCounters(game).values()) {
counters.add(new CounterView(counter));
}
} |
| File |
|---|
| CardView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| For statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
//
// set code und card number for token copies to get the image
<<<<<<< HEAD
this.rules.clear();
this.rules.addAll(((PermanentToken) card).getRules(game));
this.type = ((PermanentToken)card).getToken().getTokenType();
=======
this.rules = ((PermanentToken) card).getRules(game);
this.type = ((PermanentToken) card).getToken().getTokenType();
>>>>>>> e6b76a0704dd10b0a83a681043d1627c3d6b5629
} else {
this.rarity = card.getRarity();
this.isToken = false; |
| Solution content |
|---|
//
}
// set code und card number for token copies to get the image
this.rules.clear();
this.rules.addAll(((PermanentToken) card).getRules(game));
this.type = ((PermanentToken) card).getToken().getTokenType();
} else {
this.rarity = card.getRarity();
this.isToken = false; |
| File |
|---|
| CardView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |