connector impl

This commit is contained in:
Ilia Denisov
2026-03-14 21:11:51 +02:00
committed by GitHub
parent c2d2cebe3e
commit ac3ed31a23
9 changed files with 863 additions and 6 deletions
@@ -29,6 +29,12 @@ func newGameOnMap(r Repo, races []string, m generator.Map) (uuid.UUID, error) {
if err := r.SaveNewTurn(0, g); err != nil {
return uuid.Nil, err
}
c := NewCache(g)
for rep := range c.Report(c.g.Turn, nil, nil) {
if err := r.SaveReport(c.g.Turn, rep); err != nil {
return uuid.Nil, err
}
}
return g.ID, nil
}