Feat: components chain
This commit is contained in:
@ -62,6 +62,7 @@ type RoomPublic struct {
|
||||
BlueMime string
|
||||
RedGuessers []string
|
||||
BlueGuessers []string
|
||||
Cards []WordCard
|
||||
}
|
||||
|
||||
func (r Room) ToPublic() RoomPublic {
|
||||
|
@ -50,15 +50,21 @@ type UserState struct {
|
||||
func MakeTestState() *UserState {
|
||||
cards := []WordCard{
|
||||
{Word: "hamster", Color: "blue"},
|
||||
{Word: "child", Color: "red"},
|
||||
{Word: "wheel", Color: "white"},
|
||||
{Word: "condition", Color: "black"},
|
||||
{Word: "test", Color: "white"},
|
||||
}
|
||||
room := RoomPublic{
|
||||
ID: "test-id",
|
||||
CreatedAt: time.Now(),
|
||||
CreatorName: "test-name",
|
||||
Cards: cards,
|
||||
}
|
||||
return &UserState{
|
||||
Username: "test-name",
|
||||
Team: UserTeamNone,
|
||||
Role: UserRoleNone,
|
||||
Room: room,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user