Snake/Java: Difference between revisions

m
→‎Code: makes sure there's at least one treat at startup
m (→‎Code: Use enum constructor rather than EnumMap)
m (→‎Code: makes sure there's at least one treat at startup)
Line 104:
for (int x = 0; x < 7; x++)
snake.add(new Point(nCols / 2 + x, nRows / 2));
 
do
addTreat();
while(treats.isEmpty());
 
(gameThread = new Thread(this)).start();
Anonymous user