<commit_before>package nugugame

import (
	"fmt"
	"sort"
	"strings"
	"sync"
	"time"

	"github.com/globalsign/mgo/bson"

	"github.com/Seklfreak/Robyul2/helpers"
	"github.com/Seklfreak/Robyul2/models"
	"github.com/Seklfreak/Robyul2/modules/plugins/idols"
	"github.com/bwmarrin/discordgo"
)

const (
	NUGUGAME_DIFFICULTY_IDOLS_KEY = "nugugameIdolsByDifficulty"
)

var difficultyPercentageMap = map[string]float32{
	"easy":   .1,
	"medium": .3,
	"hard":   .7,
}
var difficultyLives = map[string]int{
	"easy":   3,
	"medium": 5,
	"hard":   7,
	"all":    10,
}
var idolsByDifficultyMutex sync.RWMutex
var idolsByDifficulty = map[string][]string{
	"easy":   []string{},
	"medium": []string{},
	"hard":   []string{},
}

// startDifficultyCacheLoop will refresh the cache for nugugame idols in difficulty
func startDifficultyCacheLoop() {
	log().Info("Starting nugugame cache loop")
	go func() {
		defer helpers.Recover()

		for {<commit_msg>[nugugame] adjusted lives per difficulty<commit_after>package nugugame

import (
	"fmt"
	"sort"
	"strings"
	"sync"
	"time"

	"github.com/globalsign/mgo/bson"

	"github.com/Seklfreak/Robyul2/helpers"
	"github.com/Seklfreak/Robyul2/models"
	"github.com/Seklfreak/Robyul2/modules/plugins/idols"
	"github.com/bwmarrin/discordgo"
)

const (
	NUGUGAME_DIFFICULTY_IDOLS_KEY = "nugugameIdolsByDifficulty"
)

var difficultyPercentageMap = map[string]float32{
	"easy":   .1,
	"medium": .3,
	"hard":   .7,
}
var difficultyLives = map[string]int{
	"easy":   3,
	"medium": 3,
	"hard":   5,
	"all":    5,
}
var idolsByDifficultyMutex sync.RWMutex
var idolsByDifficulty = map[string][]string{
	"easy":   []string{},
	"medium": []string{},
	"hard":   []string{},
}

// startDifficultyCacheLoop will refresh the cache for nugugame idols in difficulty
func startDifficultyCacheLoop() {
	log().Info("Starting nugugame cache loop")
	go func() {
		defer helpers.Recover()

		for {
{'fraction_non_alphanumeric': 0.1522198731501057, 'fraction_numerical': 0.013213530655391121, 'mean_word_length': 4.7889908256880735, 'pattern_counts': {'":': 20, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3090449', 'n_tokens_mistral': 811, 'n_tokens_neox': 788, 'n_words': 142}