Draft: poop

This commit is contained in:
2025-11-10 13:16:29 +08:00
parent dbd2ed6469
commit 30fb3d8c73
18 changed files with 503 additions and 44 deletions

24
workflows/gameServer.go Normal file
View File

@@ -0,0 +1,24 @@
package workflows
import (
"inp2025/handlers/game"
"inp2025/middlewares"
"inp2025/tcp"
)
func GameServer() *tcp.Router {
router := tcp.NewRouter().
Use(middlewares.ErrorHandler).
Use(middlewares.AccessLog)
handlers := game.NewHandlers()
// before start
router.POST("/ready", handlers.PostReady)
// game start
router.POST("/move", handlers.PostMove)
router.SOCKET("/state", handlers.SocketState)
return router
}