Fix: bot opening the same card over and over
This commit is contained in:
		| @@ -86,7 +86,7 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) { | ||||
| 		fi.Room.ClearMarks() | ||||
| 	} | ||||
| 	switch string(color) { | ||||
| 	case "black": | ||||
| 	case string(models.WordColorBlack): | ||||
| 		log.Debug("opened black word", "room", fi.Room) | ||||
| 		// game over | ||||
| 		fi.Room.IsRunning = false | ||||
| @@ -102,7 +102,7 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) { | ||||
| 		fi.Room.ThisTurnLimit = 0 | ||||
| 		fi.Room.ActionHistory = append(fi.Room.ActionHistory, action) | ||||
| 		fi.Room.ClearMarks() | ||||
| 	case "white", string(oppositeColor): | ||||
| 	case string(models.WordColorWhite), string(oppositeColor): | ||||
| 		log.Debug("opened opposite color word", "room", fi.Room, "opposite-color", oppositeColor) | ||||
| 		// end turn | ||||
| 		fi.Room.TeamTurn = oppositeColor | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder