feat: voting procedures

This commit is contained in:
Ilia Denisov
2026-01-30 12:18:32 +03:00
parent abf72c16b4
commit 824f6609ab
12 changed files with 581 additions and 18 deletions
+5
View File
@@ -44,6 +44,9 @@ func MakeTurn(c *Controller, r Repo, g *game.Game) error {
// 15. Происходит отмена маршрутов, выходящих за зону полета кораблей.
c.Cache.RemoveUnreachableRoutes()
// 16. Происходит голосование.
winners := c.Cache.TurnCalculateVotes()
/*** Last steps ***/
// Store battles
@@ -56,6 +59,7 @@ func MakeTurn(c *Controller, r Repo, g *game.Game) error {
}
}
}
// Remove killed ship groups
c.Cache.DeleteKilledShipGroups()
@@ -63,5 +67,6 @@ func MakeTurn(c *Controller, r Repo, g *game.Game) error {
// TODO: Store individual reports
_ = winners
return nil
}