7xGit / 7xGit/7xGit_Task3

Turn Skipping After Invalid Move

Đang mở Phù hợp với người mới
#3 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug enhancement
Ngôn ngữ chính
C++
Star
1
Fork
4
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Title:
Turn Counting Error After Invalid Input

Description:
After an invalid move (e.g., selecting a position that's already taken or out of bounds), the game asks the player to try again, but the turn counter still increments. This causes the turn to skip, giving the other player two turns in a row.

Steps to Reproduce:

Start the game.
Make an invalid move by choosing a taken or out-of-bounds cell.
Observe that after re-entering the move, the other player gets two turns.
Expected Behavior:
The game should not increment the turn count when the input is invalid.

Suggested Fix:
Ensure the turn counter only increments when the input is valid.

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Look for the game loop and turn-handling logic, likely in a main game file. Identify where the turn counter is incremented and where input validation occurs. Ensure the increment only happens after a valid move is confirmed. Run the game and test with invalid moves to verify the fix.

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

Đánh giá

Công nghệ
cpp
Lĩnh vực
game-dev
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
70/100

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.