a geicko-2 based round robin ranking system designed to test c++ battleship submissions battleship.dunkirk.sh

feat: mark failed submissions as failed

dunkirk.sh c3551d29 82dd4ac7

verified
Changed files
+11
internal
runner
storage
+7
internal/runner/runner.go
···
player1Wins, player2Wins, totalMoves := RunHeadToHead(newSub, opponent, 1000)
var winnerID int
avgMoves := totalMoves / 1000
···
player1Wins, player2Wins, totalMoves := RunHeadToHead(newSub, opponent, 1000)
+
// If match failed (returned 0-0-0), mark submission as compilation_failed
+
if player1Wins == 0 && player2Wins == 0 && totalMoves == 0 {
+
log.Printf("❌ Match failed for %s vs %s - marking as compilation_failed", newSub.Username, opponent.Username)
+
storage.UpdateSubmissionStatus(newSub.ID, "compilation_failed")
+
return
+
}
+
var winnerID int
avgMoves := totalMoves / 1000
+4
internal/storage/database.go
···
}
totalGames := myWins + opponentWins
score := float64(myWins) / float64(totalGames)
results = append(results, Glicko2Result{
···
}
totalGames := myWins + opponentWins
+
// Skip match pairs with no games played (prevents NaN from 0/0)
+
if totalGames == 0 {
+
continue
+
}
score := float64(myWins) / float64(totalGames)
results = append(results, Glicko2Result{