| """Test all 3 game types for diverse generation.""" |
| import sys; sys.path.insert(0, '.') |
| from app.services.generator import generate_game_mock |
| from app.services.retrieval import load_games_dataset, normalize_game_record |
|
|
| raw = load_games_dataset('app/data/games_dataset.json') |
| norm = [normalize_game_record(r) for r in raw] |
|
|
| for gt, area, diff, age in [ |
| ('scavenger_hunt', 'Le Marais', 'medium', 'adults'), |
| ('hide_and_seek', 'Parc des Buttes-Chaumont', 'easy', 'kids'), |
| ('tag', 'Jardins du Trocadéro', 'hard', 'teens'), |
| ]: |
| cfg = {'game_type': gt, 'city': 'Paris', 'area': area, 'duration_minutes': 45, |
| 'num_players': 4, 'difficulty': diff, 'age_group': age} |
| g = generate_game_mock(cfg, norm[:3]) |
| print(f"=== {g['title']} ===") |
| print(f" Theme: {g['theme']}") |
| print(f" Supervision: {g['safety']['adult_supervision']}") |
| for t in g['tasks']: |
| print(f" {t['task_id']}: {t['title']} | {t['points']}pts | {t['proof_type']}") |
| print(f" Rules: {len(g['rules'])} | Hints: {len(g['global_hints'])}") |
| for r in g['rules'][:2]: |
| print(f" - {r}") |
| print() |