random draft bug fix:

packs are forced to be 15 cards; weirdness occurs if the packs are uneven sizes including the draft ending early.
Random draft ui improvements: 
only the sets that will be used are displayed in the lobby, and the number of characters is large but still greatly reduced.
the pack selector ui will prevent you from chosing fewer than 2 packs.
This commit is contained in:
brodee 2015-07-14 22:34:58 -07:00
parent 103d80f84d
commit c7a349f65f
7 changed files with 77 additions and 35 deletions

View file

@ -80,6 +80,13 @@ public class TournamentFactory {
if (tournament.getTournamentType().isCubeBooster()) {
tournament.getOptions().getLimitedOptions().setDraftCube(CubeFactory.getInstance().createDraftCube(tournament.getOptions().getLimitedOptions().getDraftCubeName()));
tournament.setBoosterInfo(tournament.getOptions().getLimitedOptions().getDraftCubeName());
} else if (tournament.getTournamentType().isRandom()) {
StringBuilder rv = new StringBuilder( "Random Draft using sets: ");
for (Map.Entry<String, Integer> entry: setInfo.entrySet()){
rv.append(entry.getKey());
rv.append(";");
}
tournament.setBoosterInfo(rv.toString());
} else {
StringBuilder sb = new StringBuilder();
for (Map.Entry<String,Integer> entry:setInfo.entrySet()) {