Move TeamRating into game.rb next to its only producer
Assisted-by: Claude Opus 4.6 via pi
change ttpqlmxqykwtymrprswukxztlyrkzrwv
commit a63901ed1335b9b5872506ac50dea632bddb92b4
author Alpha Chen <alpha@kejadlen.dev>
date
parent tqsqsvmy
diff --git a/lib/open_skill/game.rb b/lib/open_skill/game.rb
index b0f1a63..062dc07 100644
--- a/lib/open_skill/game.rb
+++ b/lib/open_skill/game.rb
@@ -9,6 +9,13 @@ module OpenSkill
   #
   # Each argument is a placement group — an array of teams that tied at
   # that position. Each team is an array of Rating objects.
+
+  # Intermediate structure for team-level aggregation during rating.
+  # Produced by Game#team_ratings, consumed by PlackettLuce and Util helpers.
+  TeamRating = Data.define(:mu, :sigma_sq, :team, :rank) do
+    def to_a = [mu, sigma_sq, team, rank]
+  end
+
   class Game
     attr_reader :rank_groups, :teams, :rank
 
diff --git a/lib/open_skill/rating.rb b/lib/open_skill/rating.rb
index 80f2310..cfdb203 100644
--- a/lib/open_skill/rating.rb
+++ b/lib/open_skill/rating.rb
@@ -4,10 +4,4 @@
 
 module OpenSkill
   Rating = Data.define(:mu, :sigma)
-
-  # Intermediate structure for team-level aggregation during rating.
-  # Produced by Game#team_ratings, consumed by PlackettLuce and Util helpers.
-  TeamRating = Data.define(:mu, :sigma_sq, :team, :rank) do
-    def to_a = [mu, sigma_sq, team, rank]
-  end
 end