| Summary: | In the AI mode, after the snake first die, snake would always die | ||
|---|---|---|---|
| Product: | CS3343 2021/22 Group16 Greedy Snake | Reporter: | Baron Qu <zhiyanqu2-c> |
| Component: | Model section | Assignee: | Baron Qu <zhiyanqu2-c> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | ruoxinli3-c |
| Priority: | --- | ||
| Version: | Ver 3.0 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Attachments: | Related code to init coordinate | ||
|
Description
Baron Qu
2021-12-05 17:46:11 HKT
The AI snake object's coordinate has stored in an ArrayList. Original, after the snake first dies, the length would set be 3, but the remaining value stored in the ArrayList has not been clean. So when it starts again, it would be very fast to meet the original code, then die. So just initial the coordinate again is OK. Created attachment 101 [details]
Related code to init coordinate
|