You are viewing a single comment's thread from:

RE: Snake3D: Released Version 1.0 containing more features and bug fixes. [Repost]

in #utopian-io6 years ago

Thank you for your contribution! Excellent/creative idea to bring the classic snake game to 3D.

  1. I would expect unit tests to cover the behavior of snake movements and others.
  2. I think you can simplify the logics of move() a lot if you use a double-ended queue to represent the body, in your case, the seg. Read more details at: How to Design a Snake Game? i.e. you don't move the tails, you pop one from tail, and add a new one to the front.
  3. many magic numbers need to be defined as constants.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Sort:  

Thanks for your review.

  1. Based on what I found on the internet unit tests are to check on a test case if the result of some function is correct. What would it be good for in this project? I really don't see any good use of it.
  2. Yes that would reduce the overall number of calculations, but it wouldn't really say it simplifies the logics of move() where the main problem are all those checks when the head changes to another area of the cube. But thanks anyway. I'll implement it the next time I work on Snake3D.
  3. Yes. That's what I already started doing by making size refer to that one constant in main.

Thank you for your review, @justyy! Keep up the good work!

Coin Marketplace

STEEM 0.09
TRX 0.32
JST 0.033
BTC 107725.12
ETH 3830.34
USDT 1.00
SBD 0.62