| Summary: | It is found that, if the player move a piece which lead to the king of Red pieces and the king of Black pieces on the same column, with no other pieces in between them, the movement is valid. However, this move should not be allowed. | ||
|---|---|---|---|
| Product: | CS3343 2020 Group 9_Chinese Chess | Reporter: | guohan2-c |
| Component: | ChessGame | Assignee: | FENG Yi <yfeng28-c> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | guohan2-c, longtduan2-c, yfeng28-c, yinuowang3-c, yujiawang7-c |
| Priority: | --- | ||
| Version: | V2.0 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Deadline: | 2020-10-03 | ||
|
Description
guohan2-c
2020-12-06 23:25:02 HKT
The problem is located in the isValidMove() function under the Rule class. The checking for the situation where the red king and black king are in the same column, one king can kill the other king at its turn is set as a valid move. The problem is located in the isValidMove() function under the Rule class. The checking for the situation where the red king and black king are in the same column, is set as an invalid move. The added code part can be referred to [line 58-81, Rule class] |