* Tournaments - Added handling for constructed formats and password protection.

This commit is contained in:
LevelX2 2014-10-12 04:19:28 +02:00
parent 8459e8d1f9
commit 5ccc1c91ae
32 changed files with 666 additions and 267 deletions

View file

@ -29,6 +29,7 @@
package mage.interfaces;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import mage.utils.MageVersion;
import mage.view.GameTypeView;
@ -62,6 +63,16 @@ public class ServerState implements Serializable {
return gameTypes;
}
public List<GameTypeView> getTournamentGameTypes() {
List<GameTypeView> tournamentGameTypes = new ArrayList<>();
for(GameTypeView gameTypeView: gameTypes) {
if (gameTypeView.getMinPlayers() == 2 && gameTypeView.getMaxPlayers() == 2) {
tournamentGameTypes.add(gameTypeView);
}
}
return tournamentGameTypes;
}
public List<TournamentTypeView> getTournamentTypes() {
return tournamentTypes;
}