-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Difficulty; | ||
|
||
public enum DifficultyEnum | ||
{ | ||
Easy = 1, | ||
Normal, | ||
Hard, | ||
Expert | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Reflection; | ||
using Difficulty; | ||
|
||
public class Program | ||
{ | ||
static void Main() | ||
{ | ||
Console.WriteLine("1. Easy"); | ||
Console.WriteLine("2. Normal"); | ||
Console.WriteLine("3. Hard"); | ||
Console.WriteLine("4. Expert"); | ||
Console.Write("Select the difficulty: "); | ||
bool success = int.TryParse(Console.ReadLine(), out int difficultySelector); | ||
if (success && difficultySelector >= 1 && difficultySelector <= 4) | ||
{ | ||
switch (difficultySelector) | ||
{ | ||
case (int) DifficultyEnum.Easy: | ||
Console.WriteLine("Difficulty is set to Easy."); | ||
break; | ||
case (int) DifficultyEnum.Normal: | ||
Console.WriteLine("Difficulty is set to Normal."); | ||
break; | ||
case (int) DifficultyEnum.Hard: | ||
Console.WriteLine("Difficulty is set to Hard."); | ||
break; | ||
case (int) DifficultyEnum.Expert: | ||
Console.WriteLine("Difficulty is set to Expert."); | ||
break; | ||
default: | ||
Console.WriteLine("Difficulty is set to Easy."); | ||
break; | ||
} | ||
} | ||
else | ||
{ | ||
Console.WriteLine("Difficulty is unavailable."); | ||
} | ||
} | ||
} |