| Summary: | Error in isSquareSwappableExist() in Map.java | ||
|---|---|---|---|
| Product: | CandyCrush 2020 | Reporter: | ziruichen6-c |
| Component: | Source Code | Assignee: | jli262-c |
| Status: | CONFIRMED --- | ||
| Severity: | enhancement | ||
| Priority: | --- | ||
| Version: | 1.0 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
|
Description
ziruichen6-c
2020-11-18 22:14:13 HKT
The error was caused by the error of judgment condition in isSquareSwappableExist(). The solution would be to correct the judgment condition in isSquareSwappableExist() in Map.java Previous version: (itemArray[i+1][j+1].isSame(itemArray[i+1][j]) && itemArray[i+1][j+1].isSame(itemArray[i][j+1]) && ((i > 0 && itemArray[i][j].isSame(itemArray[i-1][j])) || (j > 0 && itemArray[i][j].isSame(itemArray[i][j-1]))) After correcting: itemArray[i+1][j+1].isSame(itemArray[i+1][j]) && itemArray[i+1][j+1].isSame(itemArray[i][j+1]) && ((i > 0 && itemArray[i+1][j+1].isSame(itemArray[i-1][j])) || (j > 0 && itemArray[i+1][j+1].isSame(itemArray[i][j-1]))) In version2, After further research, it is found that the four conditions detected in isSquareSwappableExist() will be covered by isHorizontalSwappableExist() and isVerticalSwappableExist(), so this function is deleted. |