Diamond Rush Game For Nokia X2-01 320x240 -
private void drawHUD(Graphics g) g.setColor(0, 0, 0); g.fillRect(0, 0, getWidth(), 20); g.setColor(255, 255, 255); g.drawString("Diamonds: " + diamondsCollected + "/" + diamondsTotal, 5, 5, Graphics.TOP
public void startApp() running = true; gameThread = new Thread(this); gameThread.start(); diamond rush game for nokia x2-01 320x240
private void restartGame() newGame();
// Game states private static final int STATE_MENU = 0; private static final int STATE_PLAYING = 1; private static final int STATE_WIN = 2; private static final int STATE_GAME_OVER = 3; private int gameState = STATE_MENU; private void drawHUD(Graphics g) g
// Place player at (1,1) map[1][1] = TILE_PLAYER; playerX = 1; playerY = 1; private void drawHUD(Graphics g) g.setColor(0
private Random random = new Random();