From 71ca61f047cafc46a13037fc07c5fcf51560f127 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 30 May 2023 23:36:22 +0200 Subject: [PATCH] Adding comment so I won't forget my plan with this branch. --- main.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/main.go b/main.go index 714e683..8aae7d0 100644 --- a/main.go +++ b/main.go @@ -37,6 +37,19 @@ func main() { } func registerForRandomGame(c *gin.Context) { + + /* + What should be done: + 1. Register player + 2. Check if there is a game open that lacks one player + 3. Fill open game, then respond with player id and game id. + OR + + 1. Register player + 2. If there is no open game, open a game and wait for a second player to join + 3. Only after a second player joins, respond with player id and game id. + */ + player := server.NewPlayer(uuid.New()) lobby := server.GetLobby()