SLMT / rust-snake

A snake game written in Rust.
MIT License
84 stars 27 forks source link

Fix Y coordinate for new food position #2

Closed guewen closed 5 years ago

guewen commented 5 years ago

It works fine now only because the width and height are equal.

I was only reading your source code for educational purposes (thanks!), when I noticed this (you left it on purpose to see if readers were being attentive, right? :)).

SLMT commented 5 years ago

Hello @guewen , thanks for finding my mistake! I would never find it if you didn't point it out. :)

I will check it later. I think this should fix issue #1 .