diff --git a/control.go b/control.go index 5381b8b..5be4c46 100644 --- a/control.go +++ b/control.go @@ -16,6 +16,7 @@ func (h JsonHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { } func startGame(w http.ResponseWriter, req *http.Request) { + log.Println("asked to create a game") new_game_name := idg.Hash() _g := NewGame(new_game_name, *width, *height) @@ -36,6 +37,7 @@ func startGame(w http.ResponseWriter, req *http.Request) { } func listGames(w http.ResponseWriter, req *http.Request) { + log.Println("games list requested") games.RLock() defer games.RUnlock() type pout struct { @@ -68,6 +70,7 @@ func listGames(w http.ResponseWriter, req *http.Request) { func stopGame(w http.ResponseWriter, req *http.Request) { trimmed := strings.Trim(req.URL.Path, "/") fullPath := strings.Split(trimmed, "/") + log.Println(req.URL.Path) if len(fullPath) != 3 { http.Error(w, "improperly formed url", http.StatusBadRequest) return