Skip to content

Conversation

@GustavoZiel
Copy link
Contributor

Fixes #44

Checks if snake size has gotten to its maximum for winning condition

Add constants:

  • MAXIMUM_SNAKE_SIZE : total number of squares that fit in the arena
  • WIN_HEAD_COLOR : snake's head color after winning

Add an attribute to the snake class:

  • snake size = 1 (head) + len(tail)

Add an event for test only (removable):

  • When pressed 'z' , snake's size attribute is set to its maximum size

Change start point count, from 0 to 1 (undoable)

@GustavoZiel GustavoZiel linked an issue Oct 15, 2023 that may be closed by this pull request
@monacofj
Copy link
Contributor

Can the snake grow until it occupies all the squares that fit into the arena?
Is this a possible outcome if playing by the rules?

@arthur-qm
Copy link

Can the snake grow until it occupies all the squares that fit into the arena? Is this a possible outcome if playing by the rules?

Yes it is. Check #44 (comment) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add feature for winning condition

3 participants