Add support for up to 6 players.

This commit is contained in:
Greyson Parrelli
2026-07-28 07:36:09 -04:00
parent e542118175
commit a4f5f6910d
38 changed files with 2306 additions and 713 deletions
+9 -2
View File
@@ -247,11 +247,18 @@ func immediateWeight(v *game.View) float64 {
if v.MaxRounds > 1 {
w += 0.60 * float64(v.Round-1) / float64(v.MaxRounds-1)
}
me := v.Players[v.YouSeat]
// How far behind the field the bot is. The yardstick is whoever is leading,
// not the sum of everyone — at a six-player table the title is a race
// against the front-runner, and summing would swamp the round term.
me := v.PlayerView(v.YouSeat)
best := 0
for _, p := range v.Players {
if p.Seat != v.YouSeat {
w += 0.08 * float64(p.Trophies-me.Trophies)
best = max(best, p.Trophies)
}
}
if me != nil {
w += 0.08 * float64(best-me.Trophies)
}
return min(max(w, 0.25), 1)
}