7xGit / 7xGit/7xGit_Task6

No Feedback for Incorrect Input

未关闭 适合新手
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement good first issue
主要语言
JavaScript
星标
1
派生
4
PR 合并指标
30 天内没有已合并 PR

描述

Title:
No Feedback or Reset Mechanism for Incorrect Input

Description:
Currently, when the user makes an incorrect guess, no feedback is provided, and the game doesn't reset. This makes it impossible for the user to understand when they've lost.

Expected Behavior:
The game should alert the user when they've made an incorrect selection and reset the game to start over.

Missing Logic:
An else block should be added to the checkAnswer() function to handle cases where the user's input does not match the correct pattern.

Suggested Fix:

Add an else block in checkAnswer() to provide feedback to the user (such as changing the text in the header to "Game Over" or adding animations).

Call startOver() inside the else block to reset the game.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Look for the checkAnswer() function in the codebase, likely in a main game logic file. Add an else block to handle incorrect guesses, providing feedback like changing header text to 'Game Over' and calling a startOver() function to reset the game state. Test by making an incorrect guess and verifying the game resets with appropriate feedback.

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
game-dev
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
75/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。