Feat: start game btn; add todos.md
This commit is contained in:
		| @@ -47,16 +47,17 @@ type Room struct { | ||||
| 	TeamTurn    string | ||||
| 	RedTeam     Team | ||||
| 	BlueTeam    Team | ||||
| 	// RedMime      string | ||||
| 	// BlueMime     string | ||||
| 	// RedGuessers  []string | ||||
| 	// BlueGuessers []string | ||||
| 	Cards        []WordCard | ||||
| 	GameSettings *GameSettings `json:"settings"` | ||||
| 	Result       uint8         // 0 for unknown; 1 is win for red; 2 if for blue; | ||||
| 	BlueCounter  uint8 | ||||
| 	RedCounter   uint8 | ||||
| 	RedTurn      bool // false is blue turn | ||||
| 	Cards       []WordCard | ||||
| 	Result      uint8 // 0 for unknown; 1 is win for red; 2 if for blue; | ||||
| 	BlueCounter uint8 | ||||
| 	RedCounter  uint8 | ||||
| 	RedTurn     bool // false is blue turn | ||||
| 	// GameSettings *GameSettings `json:"settings"` | ||||
| 	IsRunning bool   `json:"is_running"` | ||||
| 	Language  string `json:"language" example:"en" form:"language"` | ||||
| 	RoundTime int32  `json:"round_time"` | ||||
| 	// ProgressPct uint32 `json:"progress_pct"` | ||||
| 	IsOver bool | ||||
| } | ||||
|  | ||||
| func (r *Room) ChangeTurn() { | ||||
|   | ||||
| @@ -47,7 +47,7 @@ type UserState struct { | ||||
| 	Role     UserRole | ||||
| } | ||||
|  | ||||
| func MakeTestState() *FullInfo { | ||||
| func MakeTestState(creatorName string) *FullInfo { | ||||
| 	cards := []WordCard{ | ||||
| 		{Word: "hamster", Color: "blue"}, | ||||
| 		{Word: "child", Color: "red"}, | ||||
| @@ -80,14 +80,14 @@ func MakeTestState() *FullInfo { | ||||
| 	room := &Room{ | ||||
| 		ID:          "test-id", | ||||
| 		CreatedAt:   time.Now(), | ||||
| 		CreatorName: "test-name", | ||||
| 		CreatorName: creatorName, | ||||
| 		Cards:       cards, | ||||
| 		RedTeam:     redTeam, | ||||
| 		BlueTeam:    blueTeam, | ||||
| 		TeamTurn:    "blue", | ||||
| 	} | ||||
| 	us := &UserState{ | ||||
| 		Username: "test-name", | ||||
| 		Username: creatorName, | ||||
| 		Team:     UserTeamNone, | ||||
| 		Role:     UserRoleNone, | ||||
| 		RoomID:   "test-id", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder