



In the method move(), your switch statement needs a default case where you set node to null. There's no reason to use this with fields unless you're disambiguating it from a parameter. This will do: private LinkedList body = new LinkedList() you don't need to repeat the generic type on the right-hand side. I this statement: private LinkedList body = new LinkedList() It's clearer and less likely to cause bugs when being maintained. If fact, I put braces around all the clauses in an if statement. Never put the else clause on the same on the same line as else. Private Snake initSnake() else isCovered = false Public boolean isDirectionChanged = false Private Direction snakeDirection = Direction.LEFT // initial direction is LEFT Return Math.abs(head.getX() - food.getX()) + Math.abs(head.getY() - food.getY()) = 0 Private LinkedList body = new LinkedList() Pretty much anything that will help me become a better programmer.Īlso, I have commented a few things out of pure guess, so if it appears as if I have gotten something wrong, please correct me!Īlso, any extra tips for my future projects would be much appreciated! Galactic Flower Python Turtle Mini Project with Source Code. I am asking those who are more advanced programmers to help me with implementing programming techniques, better organization, how to comment better, etc. clopay torsion spring installation manual bell. I don't really want help on how to make the game better in visuals, levels, or anything like that. I am skeptical on how good of a programmer I am, and I code messy. I have rearranged the program into separate classes & methods. I have recently created a snake game in Java with the help of an online tutorial.

I am a self-taught coder, and have been learning Java for the last 2 months.
