Bug 649 - The AI snake head could impale it's body
Summary: The AI snake head could impale it's body
Status: RESOLVED FIXED
Alias: None
Product: CS3343 2021/22 Group16 Greedy Snake
Classification: Unclassified
Component: Model section (show other bugs)
Version: Ver 3.0
Hardware: PC Windows
: --- enhancement
Assignee: Baron Qu
URL:
Depends on:
Blocks:
 
Reported: 2021-12-05 18:02 HKT by Baron Qu
Modified: 2021-12-05 18:09 HKT (History)
1 user (show)

See Also:


Attachments
Code implementation (94.70 KB, image/png)
2021-12-05 18:08 HKT, Baron Qu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Baron Qu 2021-12-05 18:02:25 HKT
When the AI snake self-running, I notice that the snakehead has passed through its body, So the self-death detection does not works well.
Comment 1 Baron Qu 2021-12-05 18:08:51 HKT
Created attachment 103 [details]
Code implementation

The reason is implicit, therefore I just change the way to detect whether the snakehead collides its body or not.
Comment 2 Baron Qu 2021-12-05 18:09:30 HKT
Just change the self-death detection method.