hacker1024 / snake.dart

A flexible snake implementation in Dart.
https://pub.dev/packages/snake
MIT License
2 stars 0 forks source link

Add nextTickDirection getter #1

Open m93a opened 2 years ago

m93a commented 2 years ago

There is only a setter for snakeGame.nextTickDirection. However, one might want to render the head differently depending on the snake's direction to give the user visual feedback. Currently, the only way to achieve this is to keep track of nextTickDirection separately. Is there a reason for not including the getter too?

hacker1024 commented 2 years ago

I'm not sure why I left the getter out - from a quick review of my code, it doesn't look like there are any problems with adding one. I can take a closer look this weekend - feel free to fork the project if you want this change sooner.

Thanks for raising this issue!