import type { Difficulty, GameMode, Settings } from '../types';

export const MODE_LABELS: Record<GameMode, string> = {
  daily: 'Daily Wordle',
  infinite: 'Infinite Mode',
  'evil-daily': 'Daily Evil Challenge',
  custom: 'Custom Length',
  'super-evil': 'Super Evil Mode',
};

export const MODE_DESCRIPTIONS: Record<GameMode, string> = {
  daily: 'A seeded word each day, then practice rounds after the result.',
  infinite: 'Endless levels with longer words as your streak climbs.',
  'evil-daily': 'After two guesses, the keyboard and feedback go dark.',
  custom: 'Pick a 4, 5, 6, or 7 letter puzzle.',
  'super-evil': 'Huge words, fewer hints, and a board built for pain.',
};

export const DEFAULT_SETTINGS: Settings = {
  wordLength: 5,
  difficulty: 'wicked',
};

export const difficultyGuesses: Record<Difficulty, number> = {
  wicked: 6,
  vicious: 5,
  nightmare: 4,
};

export const getMaxGuesses = (mode: GameMode, wordLength: number, difficulty: Difficulty) => {
  if (mode === 'daily') return 6;
  if (mode === 'super-evil') return Math.max(4, Math.min(6, 16 - wordLength));
  if (mode === 'evil-daily') return 6;
  if (mode === 'infinite') return wordLength >= 7 ? 5 : 6;
  return difficultyGuesses[difficulty];
};
