Ask Your Question
1

When using pygame, what causes a snake to perish while performing a u-turn?

asked 2023-02-03 11:00:00 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-09-06 03:00:00 +0000

devzero gravatar image

When using pygame, a snake will perish while performing a u-turn if the head of the snake collides with its body. This is because in a u-turn, the snake's body overlaps with its head, causing a collision. This collision triggers the game over event and ends the game.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-02-03 11:00:00 +0000

Seen: 17 times

Last updated: Sep 06 '21