void tick() {

		if (x + xa < 0) {
			xa = 3;
			Sound.playScoreSound();
			SinglePlayerState.compScore++;
		}
		if (x + xa > GamePanel.WIDTH - image.getWidth(null)){
			xa = -3;
			Sound.playScoreSound();
			SinglePlayerState.p1Score++;
		}
		if (y + ya < 0)
			ya = 2;
		if (y + ya > GamePanel.HEIGHT - image.getHeight(null))
			ya = -2;
		if (collision()) {
			Sound.playHitSound();
			xa = -xa;
			if (xa < 11)
				xa++;
			x = 20;
			

		}
		if (collision2()) {
			Sound.playHitSound();
			xa = -xa;
			if (xa > -11)
				xa--;
			x = 980 - image.getWidth(null);
			

		}

		x = x + xa;
		y = y + ya;

	}