Skip to content

Commit a042e06

Browse files
committed
update exercise4
1 parent e7b2ef7 commit a042e06

File tree

1 file changed

+2
-1
lines changed
  • exercise4/judge/internal/ticTacToe/match

1 file changed

+2
-1
lines changed

exercise4/judge/internal/ticTacToe/match/start.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ func (m *Match) totalRoundsWonBy(p *player.Player) int {
6363
total := 0
6464

6565
for _, r := range m.Rounds {
66-
if r.Winner.URL == p.URL {
66+
if r.Winner != nil && r.Winner.URL == p.URL {
6767
total += 1
68+
break
6869
}
6970
}
7071

0 commit comments

Comments
 (0)