Akki-jaiswal / Akki-jaiswal/pong-game

Bug : Game doesn't start properly on clicking 'Pong Game'

Đang mở
#170 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
22
Fork
116
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Upon clicking the "Play Game" button, the game screen loads but:
- The game does **not start** — no paddle or ball movement.
- The **difficulty** and **theme** dropdowns don’t display their options properly.
- After a few seconds of inactivity, it **automatically displays "AI Wins"** — even though the player didn’t play.

**Steps to Reproduce:**
1. Go to the game: [Game Link](https://akki-jaiswal.github.io/pong-game/)
2. Click on "Play Game" without entering a name.
3. Observe:
- Game doesn't actually begin.
- No movement or control is possible.
- Difficulty and Theme dropdowns are mostly non-functional or invisible.
- After 5–10 seconds, it says "AI Wins" without any gameplay.

**Expected Behavior:**
- Clicking "Play Game" should start the match.
- Ball and paddles should be visible and active.
- Difficulty and Theme options should be visible and functional.
- "AI Wins" should only appear after a valid game ends.

**Possible Causes:**
- JavaScript game loop may not be starting correctly.
- Game state might be marked as "running" without rendering.
- Dropdown styles may be conflicting with the dark background.

![Image](https://github.com/user-attachments/assets/ac64d5b9-5ec6-4399-816a-a4d8af106c4a)

![Image](https://github.com/user-attachments/assets/0775d713-864a-49b3-8475-c03b075a7ce4)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.