Feat: start game
This commit is contained in:
@ -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":
|
||||
|
Reference in New Issue
Block a user