From 5bd856e04ff6ab15b3532f2e5613a8f6343adef9 Mon Sep 17 00:00:00 2001 From: Eccentric Date: Sun, 11 Feb 2024 00:58:23 +0000 Subject: [PATCH] Start base of party 2 --- person/parties.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 person/parties.go diff --git a/person/parties.go b/person/parties.go new file mode 100644 index 0000000..5fbd78d --- /dev/null +++ b/person/parties.go @@ -0,0 +1,24 @@ +package person + +import ( + "github.com/ectrc/snow/aid" + "github.com/google/uuid" +) + +type Party struct{ + ID string + Members []*Person +} + +var ( + Parties = aid.GenericSyncMap[Party]{} +) + +func NewParty() *Party { + party := &Party{ + ID: uuid.New().String(), + } + Parties.Set(party.ID, party) + + return party +} \ No newline at end of file