Bug 573 - Calculation of x-coordinate is incorrect
Summary: Calculation of x-coordinate is incorrect
Status: CONFIRMED
Alias: None
Product: CS3343 Chinese Checker
Classification: Unclassified
Component: Algorithm Component (show other bugs)
Version: unspecified
Hardware: All All
: --- minor
Assignee: yutongmen2-c
URL:
Depends on:
Blocks:
 
Reported: 2021-11-18 00:30 HKT by yutongmen2-c
Modified: 2021-11-29 15:47 HKT (History)
2 users (show)

See Also:


Attachments
The image indicates the problem towards the calculation of x-coordinate. (63.85 KB, image/jpeg)
2021-11-18 00:30 HKT, yutongmen2-c
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yutongmen2-c 2021-11-18 00:30:32 HKT
Created attachment 87 [details]
The image indicates the problem towards the calculation of x-coordinate.

This problem is found by a pair of test cases. That is, when the x-coordinate of a piece is increased by 2, the test case does not pass, while the y-coordinate doesn't have this problem. The image is as attached.

Steps to reproduce: Run the test case 7.

Actual outcome: Test case does not pass.

Expect outcome: The test case passes.
Comment 1 zhengyxue3-c 2021-11-29 15:47:42 HKT
Wrong Implementation:

result.add(candidate);

Correct implementation:

delete it