package gamemanagement

import "strings"

const (
	defaultRobotGenerateCount = 20
	maxRobotGenerateCount     = 1000
)

func robotAccountLanguage(value string) string {
	// likei 昵称和头像是资料事实来源；这里的 language 只保留为账号元数据，兼容后台旧请求传入 ar/en 的使用习惯。
	switch strings.ToLower(strings.TrimSpace(value)) {
	case "ar", "arabic", "arab":
		return "ar"
	case "en", "english":
		return "en"
	default:
		return "en"
	}
}

func robotGender(index int, requested string) string {
	requested = strings.TrimSpace(requested)
	if requested != "" {
		return requested
	}
	if index%2 == 0 {
		return "male"
	}
	return "female"
}
