MCPcopy Create free account
hub / github.com/atas76/openengine / toggle

Method toggle

src/main/java/org/openengine/prototype/engine/Match.java:58–66  ·  view source on GitHub ↗
(Team team)

Source from the content-addressed store, hash-verified

56 }
57
58 private Team toggle(Team team) {
59 if (team.getName().equals(this.homeTeam.getName())) {
60 return this.awayTeam;
61 } else if (team.getName().equals(this.awayTeam.getName())) {
62 return this.homeTeam;
63 } else {
64 throw new RuntimeException("Unexpected error: team naming mismatch");
65 }
66 }
67
68 public void playHalfTime() {
69

Callers 1

playHalfTimeMethod · 0.95

Calls 2

getNameMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected