Feat: start game

This commit is contained in:
Grail Finder
2025-05-09 11:54:01 +03:00
parent 2b4bf2ec29
commit 45761446e5
4 changed files with 57 additions and 1 deletions

View File

@ -60,6 +60,37 @@ type Room struct {
IsOver bool
}
func (r *Room) LoadTestCards() {
cards := []WordCard{
{Word: "hamster", Color: "blue"},
{Word: "child", Color: "red"},
{Word: "wheel", Color: "white"},
{Word: "condition", Color: "black"},
{Word: "test", Color: "white"},
{Word: "ball", Color: "blue"},
{Word: "violin", Color: "red"},
{Word: "rat", Color: "white"},
{Word: "perplexity", Color: "blue"},
{Word: "notion", Color: "red"},
{Word: "guitar", Color: "blue"},
{Word: "ocean", Color: "blue"},
{Word: "moon", Color: "blue"},
{Word: "coffee", Color: "blue"},
{Word: "mountain", Color: "blue"},
{Word: "book", Color: "blue"},
{Word: "camera", Color: "blue"},
{Word: "apple", Color: "red"},
{Word: "fire", Color: "red"},
{Word: "rose", Color: "red"},
{Word: "sun", Color: "red"},
{Word: "cherry", Color: "red"},
{Word: "heart", Color: "red"},
{Word: "tomato", Color: "red"},
{Word: "cloud", Color: "white"},
}
r.Cards = cards
}
func (r *Room) ChangeTurn() {
switch r.TeamTurn {
case "blue":