public void update()
	{
		if(allowed)ball.update(speed);
		
		if(ball.getY()+ball.getHeight() >= (Game.HEIGHT))
		{
			Game.lives--;
			if(Game.lives < 0)
			{
				Game.lives = 3;
				gsm.setState(gsm.TITLE);
			}
			ball = new Ball();
		}
		
		player.update();
		
		boolean winFlag = true;
		
		for(int i = 0; i < ROWS; i++)
		{
			for(int j = 0; j < COLS; j++)
			{
				if(bricks[i][j].getState())
				{
					winFlag = false;
				}
			}
		}
		
		if(winFlag)
		{
			Game.level++;
			if(Game.level > 4)
			{
				Game.level = 0;
				gsm.setState(gsm.TITLE);
			}
			else
				gsm.setState(gsm.PLAY);
		}
	}