deck improves:

* gui: removed public deck hash info;
* gui: improved xmage dck-file - now it correctly load a card's amount (related to files from third party services);
* server: fixed wrong cheating warning on deck construction (closes #11877);
* refactor: removed outdated hash code and calculations;
* other: added docs, added multiple deck hash tests;
This commit is contained in:
Oleg Agafonov 2024-04-10 22:18:07 +04:00
parent 889c1125e8
commit 7817a5cac6
32 changed files with 551 additions and 247 deletions

View file

@ -1297,20 +1297,6 @@ public class SessionImpl implements Session {
return false;
}
// @Override
// public boolean startChallenge(UUID roomId, UUID tableId, UUID challengeId) {
// try {
// if (isConnected()) {
// server.startChallenge(sessionId, roomId, tableId, challengeId);
// return true;
// }
// } catch (MageException ex) {
// handleMageException(ex);
// } catch (Throwable t) {
// handleThrowable(t);
// }
// return false;
// }
@Override
public boolean submitDeck(UUID tableId, DeckCardLists deck) {
try {

View file

@ -30,7 +30,6 @@ public class PlayerView implements Serializable {
private final Counters counters;
private final int wins;
private final int winsNeeded;
private final long deckHashCode;
private final int libraryCount;
private final int handCount;
private final boolean isActive;
@ -68,8 +67,6 @@ public class PlayerView implements Serializable {
this.counters = player.getCounters();
this.wins = player.getMatchPlayer().getWins();
this.winsNeeded = player.getMatchPlayer().getWinsNeeded();
// If match ended immediately before, deck can be set to null so check is necessarry here
this.deckHashCode = player.getMatchPlayer().getDeck() != null ? player.getMatchPlayer().getDeck().getDeckHashCode() : 0;
this.libraryCount = player.getLibrary().size();
this.handCount = player.getHand().size();
this.manaPool = new ManaPoolView(player.getManaPool());
@ -206,10 +203,6 @@ public class PlayerView implements Serializable {
return winsNeeded;
}
public long getDeckHashCode() {
return deckHashCode;
}
public int getHandCount() {
return this.handCount;
}