public static String appendMatches(IATournament tournament, List<IAMatch> matches) { String content = ""; int counter = 1; for (IAMatch m : matches) { String matchString = ""; if (m.getPlayer2() == null) { matchString += m.getPlayer1().getName() + " has a BYE"; } else { matchString += m.getPlayer1().getName() + " VS " + m.getPlayer2().getName(); if (CryodexController.getOptions().isShowTableNumbers()) { matchString = counter + ": " + matchString; counter++; } if (m.isMatchComplete()) { matchString += " - Match Results: "; if (m.getWinner() != null) { matchString += m.getWinner().getName() + " is the winner"; } } } content += "<div>" + matchString + "</div>"; } return content; }
public static void exportTournamentSlips( IATournament tournament, List<IAMatch> matches, int roundNumber) { String content = ""; int counter = 1; for (IAMatch m : matches) { String matchString = ""; if (m.getPlayer2() != null) { matchString += "<table width=100%><tr><td><h4>Round " + roundNumber + " - Table " + counter + "</h4></td><td vAlign=bottom align=left><h4>" + m.getPlayer1().getName() + "</h4></td><td vAlign=bottom align=left><h4>" + m.getPlayer2().getName() + "</h4></td></tr><tr><td>" + "</td><td class=\"smallFont\">" + "</br>" + "<div style=\"vertical-align: top; height: 100%;\"><input type=\"checkbox\">I wish to drop</input></div>" + "</td><td class=\"smallFont\">" + "</br>" + "<div style=\"vertical-align: top; height: 100%;\"><input type=\"checkbox\">I wish to drop</input></div>" + "</td></tr></table>"; if (counter % 6 == 0) { matchString += "<hr class=\"pagebreak\">"; } else { matchString += "<hr>"; } content += matchString; counter++; } } ExportUtils.displayHTML(content, "ExportMatchSlips"); }