Making the variable tick static will make your game not reset to the proper
starting tick of .5 if you play multiple games in a row. If your tick has
gotten to .01 (or whatever the case may be) it will start a new game with that
value. I would suggest changing it to just float tick = TICK_INITIAL;
public class World {
static final int WORLD_WIDTH = 10;
static final int WORLD_HEIGHT = 13;
static final int SCORE_INCREMENT = 10;
static final float TICK_INITIAL = 0.5F;
static final float TICK_DECREMENT = 0.05f;
public Snake snake;
public Stain stain;
public boolean gameOver = false;
public int score = 0;
boolean fields[][] = new boolean[WORLD_WIDTH][WORLD_HEIGHT];
Random rand = new Random();
float tickTime = 0;
static float tick = TICK_INITIAL;
Original issue reported on code.google.com by honestgu...@gmail.com on 8 Nov 2011 at 7:20
Original issue reported on code.google.com by
honestgu...@gmail.com
on 8 Nov 2011 at 7:20