func (g *Game) updateUserPoints(ctx context.Context, winningPlayerName player.Name) error {
	userPoints := make(map[string]int, len(g.players))
	for pn, p := range g.players {
		points := 1
		if pn == winningPlayerName {
			points = p.WinPoints
		}
		userPoints[string(pn)] = points
	}
	return g.userDao.UpdatePointsIncrement(ctx, userPoints)
}
// updateUserPoints updates the points for users in the game after a player has won.
// The winning player gets their winpoints, which should be at least 2.  Other players in the game get a consolation point.
updateUserPoints updates the points for users in the game after a player has won.
The winning player gets their winpoints, which should be at least 2.  Other players in the game get a consolation point.
// updateUserPoints updates the points for users in the game after a player has won . // The winning player gets their winpoints which should be at least 2 . Other players in the game get a consolation point .
func (g *Game) updateUserPoints(ctx context.Context, winningPlayerName player.Name) error {
	userPoints := make(map[string]int, len(g.players))
	for pn, p := range g.players {
		points := 1
		if pn == winningPlayerName {
			points = p.WinPoints
		}
		userPoints[string(pn)] = points
	}
	return g.userDao.UpdatePointsIncrement(ctx, userPoints)
}
func ( g * Game ) updateUserPoints ( ctx context . Context , winningPlayerName player . Name ) error { userPoints := make ( map [ string ] int , len ( g . players ) ) for pn , p := range g . players { points := 1 if pn == winningPlayerName { points = p . WinPoints } userPoints [ string ( pn ) ] = points } return g . userDao . UpdatePointsIncrement ( ctx , userPoints ) }
updateUserPoints updates the points for users in the game after a player has won.
updateUserPoints updates the points for users in the game after a player has won .