Add progressive hints to practice problems

Đang mở
#11 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi

Hướng nghiên cứu

Read backend/arena/docs/problems.md and backend/arena/scripts/validate-problems.js to understand the problem format and validation, then trace how practice problems and battle payloads are assembled from frontend/pages/problems/[slug].js and frontend/pages/battle.js. Add and document optional hints, validate them, display them one at a time only in practice, and ensure battle responses omit them. Add examples for five problems and tests for validation and battle payloads; run npm test and node scripts/check-boundary.js.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement help wanted

Players who are stuck get nothing between the examples and giving up. Problems have no hints field today.

What to do

  • Add an optional hints field to the problem format: an array of short strings, from gentle nudge to near-solution. Document it in backend/arena/docs/problems.md.
  • Teach backend/arena/scripts/validate-problems.js to accept it and reject empty or non-string hints.
  • In practice (frontend/pages/problems/[slug].js), show a "Show hint" button that reveals one hint at a time.
  • Hints must not be available during ranked battles (frontend/pages/battle.js). Make sure the backend does not send them to battle clients at all, not just hide them in the UI.
  • Write hints for at least five existing problems as examples.

Definition of done

  • Hints appear one by one in practice and never in a battle response (check the network payload).
  • Tests cover the validator and the battle payload.
  • npm test and node scripts/check-boundary.js pass.
Ngôn ngữ chính
JavaScript
Star
0
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sennaicodes/codearena

Tất cả issue của sennaicodes/codearena

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.