forked from External/mage
* Tournaments - Added handling for constructed formats and password protection.
This commit is contained in:
parent
8459e8d1f9
commit
5ccc1c91ae
32 changed files with 666 additions and 267 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue