static DifficultySettings() { Easy = new DifficultyParameters(true, 8, 0.0f, 8); Medium = new DifficultyParameters(true, 6, 0.6f, 10); Hard = new DifficultyParameters(false, 4, 1.2f, 12); CurrentDifficulty = Easy; }
public static void SetDifficulty(DifficultyEnum difficulty) { switch (difficulty) { case DifficultyEnum.Easy: CurrentDifficulty = Easy; break; case DifficultyEnum.Medium: CurrentDifficulty = Medium; break; case DifficultyEnum.Hard: CurrentDifficulty = Hard; break; } }
private static DifficultyParameters GetVeryHard() { var hardParams = new DifficultyParameters() { Difficulty = PuzzleDifficulty.VeryHard, MirrorsRatioMin = 0.22f, MirrorsRatioMax = 0.52f, UniqueSolutionPaths = 0.55f, RandomFillComplexity = 0.8f }; hardParams.SetMaxPath(BoardSize.Four, 9); hardParams.SetMaxPath(BoardSize.Five, 11); hardParams.SetMaxPath(BoardSize.Six, 13); hardParams.SetMaxPath(BoardSize.Eight, 16); return(hardParams); }
private static DifficultyParameters GetMedium() { var mediumParams = new DifficultyParameters() { Difficulty = PuzzleDifficulty.Medium, MirrorsRatioMin = 0.22f, MirrorsRatioMax = 0.52f, UniqueSolutionPaths = 0.74f, RandomFillComplexity = 0.4f }; mediumParams.SetMaxPath(BoardSize.Four, 6); mediumParams.SetMaxPath(BoardSize.Five, 7); mediumParams.SetMaxPath(BoardSize.Six, 9); mediumParams.SetMaxPath(BoardSize.Eight, 12); return(mediumParams); }
private static DifficultyParameters GetEasy() { var easyParams = new DifficultyParameters() { Difficulty = PuzzleDifficulty.Easy, MirrorsRatioMin = 0.22f, MirrorsRatioMax = 0.52f, UniqueSolutionPaths = 0.80f, RandomFillComplexity = 0.2f }; easyParams.SetMaxPath(BoardSize.Four, 5); easyParams.SetMaxPath(BoardSize.Five, 6); easyParams.SetMaxPath(BoardSize.Six, 7); easyParams.SetMaxPath(BoardSize.Eight, 9); return(easyParams); }
public static DifficultyParameters GetDifficultyParameters(PuzzleDifficulty difficulty) { DifficultyParameters difficultyParameters = null; switch (difficulty) { case PuzzleDifficulty.Easy: difficultyParameters = GetEasy(); break; case PuzzleDifficulty.Medium: difficultyParameters = GetMedium(); break; case PuzzleDifficulty.Hard: difficultyParameters = GetHard(); break; case PuzzleDifficulty.VeryHard: difficultyParameters = GetVeryHard(); break; } return(difficultyParameters); }
public StartGameEventArgs(DifficultyParameters difficultyParameters) { DifficultyParameters = difficultyParameters; }