package zero1hd.polyjet.controls;

import com.badlogic.gdx.Gdx;

import zero1hd.polyjet.audio.AudioAnalyzer;

public class RhythmMap {
	private boolean done;
	public Thread generator;
	public GenerationAlgorithm generationAlgorithm;
	int window = 0;
	public AudioAnalyzer analyzer;
	
	public RhythmMap(AudioAnalyzer analyzer) {
		this.analyzer = analyzer;
		generationAlgorithm = new GenerationAlgorithm();
	}
	
	public void generateMapData(int difficulty) {
		generationAlgorithm.setDifficulty(difficulty);
		generator = new Thread(generationAlgorithm);
		generator.start();
	}
	
	public boolean isDone() {
		return done;
	}
	
	private class GenerationAlgorithm implements Runnable {
		private int difficulty;
		@Override
		public void run() {
			Gdx.app.debug("Difficulty", String.valueOf(difficulty));
		}
		
		public void setDifficulty(int difficulty) {
			this.difficulty = difficulty;
		}
	}
}
