feat: voting procedures
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user