| Summary: | Game continues after one King is eaten by opponent | ||
|---|---|---|---|
| Product: | CS3343 Group 26 XiangQi Game | Reporter: | Tracy Puk <tcpuk2-c> |
| Component: | Display | Assignee: | Teresa Fung <chinwfung3-c> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | ||
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Game continues after Black King was eaten | ||
Root cause: logic error when checking is there 2 kings on the ChessBoard Solution: Added variable to store the color of the winner when one of the King is eaten Then check whether that variable is null to determine whether the game should continue |
Created attachment 133 [details] Game continues after Black King was eaten 1. Steps to reproduce the bug: Start the game Play until one of the king is eaten 2. Expected result: Game ends and will print out message to notify player that game is ended and announce the winner 3. Actual result: The game continues and requires user to input next move