jajodiaraghav / Snake

A simple game built using Python Pygame Library
20 stars 26 forks source link

Fixed snake eating itself on moving in the opposite direction #20

Closed CaptainDaVinci closed 6 years ago

CaptainDaVinci commented 6 years ago

Refer issue #19

To fix this I compared the direction the user intends to go with the direction the snake is currently moving in if the directions are opposite then the direction won't be updated.

jajodiaraghav commented 6 years ago

Great work @CaptainDaVinci This really was a bug and needs fixing.