diff --git a/51_Hurkle/csharp/src/hurkle/CardinalDirection.cs b/51_Hurkle/csharp/CardinalDirection.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/CardinalDirection.cs rename to 51_Hurkle/csharp/CardinalDirection.cs diff --git a/51_Hurkle/csharp/src/hurkle/ConsoleHurkleView.cs b/51_Hurkle/csharp/ConsoleHurkleView.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/ConsoleHurkleView.cs rename to 51_Hurkle/csharp/ConsoleHurkleView.cs diff --git a/51_Hurkle/csharp/src/hurkle/FailedGuessViewModel.cs b/51_Hurkle/csharp/FailedGuessViewModel.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/FailedGuessViewModel.cs rename to 51_Hurkle/csharp/FailedGuessViewModel.cs diff --git a/51_Hurkle/csharp/src/hurkle/GamePoint.cs b/51_Hurkle/csharp/GamePoint.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/GamePoint.cs rename to 51_Hurkle/csharp/GamePoint.cs diff --git a/51_Hurkle/csharp/src/hurkle/GuessViewModel.cs b/51_Hurkle/csharp/GuessViewModel.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/GuessViewModel.cs rename to 51_Hurkle/csharp/GuessViewModel.cs diff --git a/51_Hurkle/csharp/src/hurkle/hurkle.csproj b/51_Hurkle/csharp/Hurkle.csproj similarity index 95% rename from 51_Hurkle/csharp/src/hurkle/hurkle.csproj rename to 51_Hurkle/csharp/Hurkle.csproj index 1d2d39a9..20827042 100644 --- a/51_Hurkle/csharp/src/hurkle/hurkle.csproj +++ b/51_Hurkle/csharp/Hurkle.csproj @@ -1,8 +1,8 @@ - - - - Exe - net5.0 - - - + + + + Exe + net5.0 + + + diff --git a/51_Hurkle/csharp/Hurkle.sln b/51_Hurkle/csharp/Hurkle.sln index e1792677..d1a6fb25 100644 --- a/51_Hurkle/csharp/Hurkle.sln +++ b/51_Hurkle/csharp/Hurkle.sln @@ -3,25 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EBE7BC2B-8F2E-41D5-AF36-7AAC7CE0E1BF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hurkle", "src\hurkle\hurkle.csproj", "{47578EC1-A012-4BF7-8709-64F675E72DB0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hurkle", "Hurkle.csproj", "{BE321D5B-93BD-4F91-A875-564DC9D4094F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BE321D5B-93BD-4F91-A875-564DC9D4094F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE321D5B-93BD-4F91-A875-564DC9D4094F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE321D5B-93BD-4F91-A875-564DC9D4094F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE321D5B-93BD-4F91-A875-564DC9D4094F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {47578EC1-A012-4BF7-8709-64F675E72DB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {47578EC1-A012-4BF7-8709-64F675E72DB0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {47578EC1-A012-4BF7-8709-64F675E72DB0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {47578EC1-A012-4BF7-8709-64F675E72DB0}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {47578EC1-A012-4BF7-8709-64F675E72DB0} = {EBE7BC2B-8F2E-41D5-AF36-7AAC7CE0E1BF} + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {42DC6AE5-5127-4B1B-BD5E-F3B1CCDC3822} EndGlobalSection EndGlobal diff --git a/51_Hurkle/csharp/src/hurkle/HurkleGame.cs b/51_Hurkle/csharp/HurkleGame.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/HurkleGame.cs rename to 51_Hurkle/csharp/HurkleGame.cs diff --git a/51_Hurkle/csharp/src/hurkle/IHurkleView.cs b/51_Hurkle/csharp/IHurkleView.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/IHurkleView.cs rename to 51_Hurkle/csharp/IHurkleView.cs diff --git a/51_Hurkle/csharp/src/hurkle/LossViewModel.cs b/51_Hurkle/csharp/LossViewModel.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/LossViewModel.cs rename to 51_Hurkle/csharp/LossViewModel.cs diff --git a/51_Hurkle/csharp/src/hurkle/Program.cs b/51_Hurkle/csharp/Program.cs similarity index 97% rename from 51_Hurkle/csharp/src/hurkle/Program.cs rename to 51_Hurkle/csharp/Program.cs index 148308d1..e5c3f6af 100644 --- a/51_Hurkle/csharp/src/hurkle/Program.cs +++ b/51_Hurkle/csharp/Program.cs @@ -1,64 +1,64 @@ -using System; - -namespace hurkle -{ - class Program - { - static void Main(string[] args) - { - /* - Original source transscription - 10 PRINT TAB(33);"HURKLE" - 20 PRINT TAB(15);"CREATIVE COMPUTING NORRISTOWN, NEW JERSEY" - 30 PRINT;PRINT;PRINT - */ - Console.WriteLine(new string(' ', 33) + @"HURKLE"); - Console.WriteLine(new string(' ', 15) + @"CREATIVE COMPUTING NORRISTOWN, NEW JERSEY"); - /* - 110 N=5 - 120 G=10 - */ - var N=5; - var G=10; - /* - 210 PRINT - 220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE" - 230 PRINT "ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A" - 240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO" - 250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES." - 260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE" - 270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE." - 280 PRINT - */ - // Using string formatting via the '$' string - Console.WriteLine(); - Console.WriteLine($"A HURKLE IS HIDING ON A {G} BY {G} GRID. HOMEBASE"); - Console.WriteLine(@"ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A"); - Console.WriteLine(@"PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO"); - Console.WriteLine($"GUESS THE HURKLE'S GRIDPOINT. YOU GET {N} TRIES."); - Console.WriteLine(@"AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE"); - Console.WriteLine(@"DIRECTION TO GO TO LOOK FOR THE HURKLE."); - Console.WriteLine(); - - var view = new ConsoleHurkleView(); - var hurkle = new HurkleGame(N,G, view); - while(true) - { - hurkle.PlayGame(); - - Console.WriteLine("PLAY AGAIN? (Y)ES/(N)O"); - var playAgainResponse = Console.ReadLine(); - if(playAgainResponse.Trim().StartsWith("y", StringComparison.InvariantCultureIgnoreCase)) - { - Console.WriteLine(); - Console.WriteLine("LET'S PLAY AGAIN. HURKLE IS HIDING"); - Console.WriteLine(); - }else{ - Console.WriteLine("THANKS FOR PLAYING!"); - break; - } - - } - } - } -} +using System; + +namespace hurkle +{ + class Program + { + static void Main(string[] args) + { + /* + Original source transscription + 10 PRINT TAB(33);"HURKLE" + 20 PRINT TAB(15);"CREATIVE COMPUTING NORRISTOWN, NEW JERSEY" + 30 PRINT;PRINT;PRINT + */ + Console.WriteLine(new string(' ', 33) + @"HURKLE"); + Console.WriteLine(new string(' ', 15) + @"CREATIVE COMPUTING NORRISTOWN, NEW JERSEY"); + /* + 110 N=5 + 120 G=10 + */ + var N=5; + var G=10; + /* + 210 PRINT + 220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE" + 230 PRINT "ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A" + 240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO" + 250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES." + 260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE" + 270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE." + 280 PRINT + */ + // Using string formatting via the '$' string + Console.WriteLine(); + Console.WriteLine($"A HURKLE IS HIDING ON A {G} BY {G} GRID. HOMEBASE"); + Console.WriteLine(@"ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A"); + Console.WriteLine(@"PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO"); + Console.WriteLine($"GUESS THE HURKLE'S GRIDPOINT. YOU GET {N} TRIES."); + Console.WriteLine(@"AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE"); + Console.WriteLine(@"DIRECTION TO GO TO LOOK FOR THE HURKLE."); + Console.WriteLine(); + + var view = new ConsoleHurkleView(); + var hurkle = new HurkleGame(N,G, view); + while(true) + { + hurkle.PlayGame(); + + Console.WriteLine("PLAY AGAIN? (Y)ES/(N)O"); + var playAgainResponse = Console.ReadLine(); + if(playAgainResponse.Trim().StartsWith("y", StringComparison.InvariantCultureIgnoreCase)) + { + Console.WriteLine(); + Console.WriteLine("LET'S PLAY AGAIN. HURKLE IS HIDING"); + Console.WriteLine(); + }else{ + Console.WriteLine("THANKS FOR PLAYING!"); + break; + } + + } + } + } +} diff --git a/51_Hurkle/csharp/src/hurkle/VictoryViewModel.cs b/51_Hurkle/csharp/VictoryViewModel.cs similarity index 100% rename from 51_Hurkle/csharp/src/hurkle/VictoryViewModel.cs rename to 51_Hurkle/csharp/VictoryViewModel.cs