Skip to content

Bug: Hard difficulty shows 5-letter words instead of 6-letter words in Daily Challenge mode #3

@skvinderr

Description

@skvinderr

🐛 Bug Description

When selecting "Hard" difficulty (which should generate 6-letter words) while in "Daily Challenge" mode, the game generates 5-letter words instead.

📋 Steps to Reproduce

  1. Open the TextTangle game
  2. Ensure "Daily Challenge" is ON
  3. Select "Hard" difficulty (6 Letters)
  4. Click "Launch Game"
  5. Observe that the game shows "Length: 5" instead of "Length: 6"

🎯 Expected Behavior

  • Hard difficulty should generate 6-letter words
  • Game should display "Length: 6"

🔍 Actual Behavior

  • Hard difficulty generates 5-letter words
  • Game displays "Length: 5"

🛠️ Root Cause

The fetchWord() function in script.js ignores the length parameter in daily mode and always uses a hardcoded 5-letter word list.

💡 Proposed Solution

Replace the hardcoded daily word generation with the existing getDailyWord(length) function that respects the difficulty setting.

🖼️ Screenshots

Image

🌐 Environment

  • Browser: [Your browser]
  • OS: Windows
  • Device: Desktop

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions