osso73 / classic_games

A series of classic games in Kivy
MIT License
3 stars 1 forks source link

Add tail #56

Closed osso73 closed 3 years ago

osso73 commented 3 years ago

The last snake part should show a different image, to show it's the tail of the snake.

Idea for implementation: the SnakePart has an attribute called is_tail. If True, the part will show the image of a tail. The GameBoard.snake_parts attribute has to be a PropertyList(). Add GameBoard.on_snake_parts method that will ensure every time a new part is added the tail will be flagged to the last part.

Need to find a nice image for the tail.

osso73 commented 3 years ago

Note that the tail image has to be directional as well, like the head (e.g. have one image for each direction). This can be tricky...

osso73 commented 3 years ago

Tail added. I had to add some complexity in the SnakePart class to handle the direction. This is done now.