aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/game/hub.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-29 22:27:20 +0900
committernsfisis <nsfisis@gmail.com>2024-07-29 22:27:20 +0900
commit49d9fa996e825a3349955c41d13307f33d0e7421 (patch)
tree99fd75997429cb6bb6512f9b2b310e9052bc3ddd /backend/game/hub.go
parent3a1e09991708bff1d0c0cfd5b1b091924cca9e8f (diff)
downloadphperkaigi-2025-albatross-49d9fa996e825a3349955c41d13307f33d0e7421.tar.gz
phperkaigi-2025-albatross-49d9fa996e825a3349955c41d13307f33d0e7421.tar.zst
phperkaigi-2025-albatross-49d9fa996e825a3349955c41d13307f33d0e7421.zip
refactor(backend)
Diffstat (limited to 'backend/game/hub.go')
-rw-r--r--backend/game/hub.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/game/hub.go b/backend/game/hub.go
index 770d257..54ea2d0 100644
--- a/backend/game/hub.go
+++ b/backend/game/hub.go
@@ -255,6 +255,10 @@ func (hubs *GameHubs) Close() {
}
}
+func (hubs *GameHubs) getHub(gameID int) *gameHub {
+ return hubs.hubs[gameID]
+}
+
func (hubs *GameHubs) RestoreFromDB(ctx context.Context) error {
games, err := hubs.q.ListGames(ctx)
if err != nil {