Variable name, declaration and assignment optimisations, Enum for directions and restart option.
Opened this issue · 1 comments
Abductcows commented
I'd like to improve the readability of the project and add a restart button
Some examples for the readability part:
ranX= 0 + (int)(Math.random()*19);
-> ranX = (int) (Math.random()*19)
directionSnake = 1
-> snakeDirection = Directions.RIGHT
ArrayList<ArrayList<DataOfSquare>> Squares= new ArrayList<ArrayList<DataOfSquare>>();
-> ... = new ArrayList<>();
Abductcows commented
#18 done, did not add the third part to maybe keep it compatible with older java versions