implemented guess endpoint

This commit is contained in:
Hazel Noack
2025-06-30 13:11:23 +02:00
parent 748c2de536
commit 1e0a4c6317
4 changed files with 69 additions and 13 deletions

View File

@@ -29,14 +29,15 @@ type Session struct {
func NewSession(phrase string) Session {
sessionName := petname.Generate(3, "-")
p := strings.Split(phrase, "")
s := Session{
id: lastSessionId,
Name: sessionName,
Users: []User{},
phrase: []string{phrase},
phrase: p,
AskedLetters: []string{},
DiscoveredPhrase: make([]string, len(phrase)),
DiscoveredPhrase: make([]string, len(p)),
Mistakes: 0,
userIndex: 0,
CurrentUser: nil,