tangled
alpha
login
or
join now
dunkirk.sh
/
battleship-arena
1
fork
atom
a geicko-2 based round robin ranking system designed to test c++ battleship submissions
battleship.dunkirk.sh
1
fork
atom
overview
issues
pulls
pipelines
feat: mark failed submissions as failed
dunkirk.sh
3 months ago
c3551d29
82dd4ac7
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+11
2 changed files
expand all
collapse all
unified
split
internal
runner
runner.go
storage
database.go
+7
internal/runner/runner.go
···
310
310
311
311
player1Wins, player2Wins, totalMoves := RunHeadToHead(newSub, opponent, 1000)
312
312
313
313
+
// If match failed (returned 0-0-0), mark submission as compilation_failed
314
314
+
if player1Wins == 0 && player2Wins == 0 && totalMoves == 0 {
315
315
+
log.Printf("❌ Match failed for %s vs %s - marking as compilation_failed", newSub.Username, opponent.Username)
316
316
+
storage.UpdateSubmissionStatus(newSub.ID, "compilation_failed")
317
317
+
return
318
318
+
}
319
319
+
313
320
var winnerID int
314
321
avgMoves := totalMoves / 1000
315
322
+4
internal/storage/database.go
···
797
797
}
798
798
799
799
totalGames := myWins + opponentWins
800
800
+
// Skip match pairs with no games played (prevents NaN from 0/0)
801
801
+
if totalGames == 0 {
802
802
+
continue
803
803
+
}
800
804
score := float64(myWins) / float64(totalGames)
801
805
802
806
results = append(results, Glicko2Result{