From 4bc24431d2b53bff7e5a56fbb74d8d19183d94c6 Mon Sep 17 00:00:00 2001 From: Evgeny Kovalev Date: Fri, 26 May 2023 14:19:53 +0300 Subject: [PATCH] Player now supports WS --- internal/player/player.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/player/player.go b/internal/player/player.go index 452c176..1fe6313 100644 --- a/internal/player/player.go +++ b/internal/player/player.go @@ -1,9 +1,14 @@ package player +import "github.com/gorilla/websocket" + type Player struct { Name string `json:"Name"` Password string `json:"Password"` + //Connection WS variable TODO + Conn *websocket.Conn + AuthString string `json:"AuthString"` Level string `json:"Level"` // hidden from user, for balancing purposes @@ -14,4 +19,6 @@ type Player struct { Won int `json:"Won"` Lost int `json:"Lost"` WinRate int `json:"WinRate"` + + Health int `json:"Health"` }