MCPcopy Create free account
hub / github.com/Card-Forge/forge / getGamesWon

Method getGamesWon

forge-game/src/main/java/forge/game/Match.java:154–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152 return sum;
153 }
154 public Multiset<RegisteredPlayer> getGamesWon() {
155 final Multiset<RegisteredPlayer> won = HashMultiset.create(players.size());
156 for (final GameOutcome go : getOutcomes()) {
157 if (go.getWinningPlayer() == null) {
158 // Game hasn't finished yet. Exit early.
159 return won;
160 }
161 won.add(go.getWinningPlayer());
162 }
163 return won;
164 }
165
166 public boolean isWonBy(LobbyPlayer questPlayer) {
167 return getGamesWonBy(questPlayer) >= rules.getGamesToWinMatch();

Callers 1

getTitleMethod · 0.95

Calls 5

getOutcomesMethod · 0.95
getWinningPlayerMethod · 0.80
createMethod · 0.65
sizeMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected