@Override
	public void gameUpdate() {
		if((!gameOver) && (hasStarted)) {
			elapsedTimeInSeconds = (System.nanoTime() - currentTime) / 1000000000f;
			//elapsedTimeInSeconds = 0.25f;
			currentTime = System.nanoTime();
			previousPositionOfBall.x = ballX;
			previousPositionOfBall.y = ballY;
			
			yEnergy += (YFORCE * elapsedTimeInSeconds);
			xEnergy += (XFORCE * elapsedTimeInSeconds);
			// make sure ball isn't going too fast.
			double zEnergy = Math.sqrt(Math.pow(yEnergy,2) + Math.pow(xEnergy, 2));
			if(zEnergy > 800) {
				yEnergy = (yEnergy / zEnergy) * 800;
				xEnergy = (xEnergy / zEnergy) * 800;
			}
			
			ballY += (yEnergy * elapsedTimeInSeconds);			
			ballX += (xEnergy * elapsedTimeInSeconds);
			
			if((lives == 0) || ((yEnergy == 0) && (xEnergy == 0))) {
				gameOver = true;
			}
			synchronized (BOMBSLOCKOBJECT) {
				Iterator<Bomb> i = bombs.iterator();
				while(i.hasNext()) {
					Bomb b = i.next();
					if(b.Age(currentTime) > 1000000000l) {
						i.remove();
					}
				}
			}
			
			checkImpact();
		}
	}