From 0e92acb2701f26090f7c41ac971febfe64bfe77c Mon Sep 17 00:00:00 2001 From: mpuchstein Date: Mon, 18 Nov 2024 14:30:55 +0100 Subject: [PATCH] starting to refactor the code in multiple packages --- internal/gmgr/gomgr.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 internal/gmgr/gomgr.go diff --git a/internal/gmgr/gomgr.go b/internal/gmgr/gomgr.go new file mode 100644 index 0000000..fd9999b --- /dev/null +++ b/internal/gmgr/gomgr.go @@ -0,0 +1,27 @@ +package gmgr + +type player struct { + id int + name string +} + +func newPlayer(id int, name string) *player { + return &player{id: id, name: name} +} + +func (p *player) Id() int { + return p.id +} + +func (p *player) Name() string { + return p.name +} + +func (p *player) SetName(name string) { + p.name = name +} + +type lobby struct { + id int + teams []player +}