package dk.itu.mario.level.generator;

import java.util.Random;

import dk.itu.mario.MarioInterface.GamePlay;
import dk.itu.mario.MarioInterface.LevelGenerator;
import dk.itu.mario.MarioInterface.LevelInterface;
import dk.itu.mario.engine.DataRecorder;
import dk.itu.mario.level.CustomizedLevel;
import dk.itu.mario.level.Level;

public class CustomizedLevelGenerator implements LevelGenerator {
	@Override
	public int generateLevelDifficulty(GamePlay playerMetrics, DataRecorder dataRecorder) {
		System.out.println("Generating level difficulty based on playerMetrics, dataRecorder: 1");
		return 1;
	}
	
	@Override
	public LevelInterface generateLevel(GamePlay playerMetrics) {
		System.out.println("Generating customized level");
		LevelInterface level = new CustomizedLevel(320, 15,
				new Random().nextLong(), 1, 1, playerMetrics);
		return level;
	}
	
	@Override
	public LevelInterface generateLevel(GamePlay playerMetrics, DataRecorder dataRecorder) {
		System.out.println("Generating customized level");
		LevelInterface level = new CustomizedLevel(320, 15,
				new Random().nextLong(), 1, 1, playerMetrics, dataRecorder);
		return level;
	}

	@Override
	public LevelInterface generateLevel(String detailedInfo) {
		throw new UnsupportedOperationException("Level generation from DataRecorder String not implemented.");
	}

	@Override
	public int generateLevelType(GamePlay playerMetrics, DataRecorder dataRecorder) {
		System.out.println("Generating level type based on playerMetrics, dataRecorder: TYPE_OVERGROUND");
		return Level.TYPE_OVERGROUND;
	}
}