diff --git a/25_Chief/csharp/Resources/Answer.txt b/25_Chief/csharp/Resources/Answer.txt new file mode 100644 index 00000000..2ac8f3a6 --- /dev/null +++ b/25_Chief/csharp/Resources/Answer.txt @@ -0,0 +1 @@ + What do you have \ No newline at end of file diff --git a/25_Chief/csharp/Resources/Believe.txt b/25_Chief/csharp/Resources/Believe.txt new file mode 100644 index 00000000..01963221 --- /dev/null +++ b/25_Chief/csharp/Resources/Believe.txt @@ -0,0 +1 @@ +Now do you believe me \ No newline at end of file diff --git a/25_Chief/csharp/Resources/Bet.txt b/25_Chief/csharp/Resources/Bet.txt new file mode 100644 index 00000000..724512fc --- /dev/null +++ b/25_Chief/csharp/Resources/Bet.txt @@ -0,0 +1 @@ +I bet your number was{0}. Am I right \ No newline at end of file diff --git a/25_Chief/csharp/Resources/Bye.txt b/25_Chief/csharp/Resources/Bye.txt new file mode 100644 index 00000000..e69de29b diff --git a/25_Chief/csharp/Resources/Instructions.txt b/25_Chief/csharp/Resources/Instructions.txt new file mode 100644 index 00000000..b4425be0 --- /dev/null +++ b/25_Chief/csharp/Resources/Instructions.txt @@ -0,0 +1,2 @@ + Take a number and add 3. Divide this number by 5 and +multiply by 8. Divide by 5 and add the same. Subtract 1. diff --git a/25_Chief/csharp/Resources/Lightning.txt b/25_Chief/csharp/Resources/Lightning.txt new file mode 100644 index 00000000..c2f564bd --- /dev/null +++ b/25_Chief/csharp/Resources/Lightning.txt @@ -0,0 +1,31 @@ +You have made me mad!!! +There must be a great lightning bolt!! + + + X X + X X + X X + X X + X X + X X + X X + X X + X X + X XXX + X X + XX X + X X + X X + X X + X X + X X + X X + X X + X X + XX + X + * + +######################### + +I hope you believe me now, for your sake!! diff --git a/25_Chief/csharp/Resources/Original.txt b/25_Chief/csharp/Resources/Original.txt new file mode 100644 index 00000000..954b026d --- /dev/null +++ b/25_Chief/csharp/Resources/Original.txt @@ -0,0 +1 @@ +What was your original number \ No newline at end of file diff --git a/25_Chief/csharp/Resources/Ready.txt b/25_Chief/csharp/Resources/Ready.txt new file mode 100644 index 00000000..c57946cb --- /dev/null +++ b/25_Chief/csharp/Resources/Ready.txt @@ -0,0 +1,2 @@ +I am Chief Numbers Freek, the great Indian math god. +Are you ready to take the test you called me out for \ No newline at end of file diff --git a/25_Chief/csharp/Resources/Resource.cs b/25_Chief/csharp/Resources/Resource.cs new file mode 100644 index 00000000..637a4983 --- /dev/null +++ b/25_Chief/csharp/Resources/Resource.cs @@ -0,0 +1,41 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +namespace Chief.Resources; + +internal static class Resource +{ + internal static class Streams + { + public static Stream Bye => GetStream(); + public static Stream Instructions => GetStream(); + public static Stream Lightning => GetStream(); + public static Stream ShutUp => GetStream(); + public static Stream Title => GetStream(); + } + + internal static class Formats + { + public static string Bet => GetString(); + public static string Working => GetString(); + } + + internal static class Prompts + { + public static string Answer => GetString(); + public static string Believe => GetString(); + public static string Original => GetString(); + public static string Ready => GetString(); + } + + private static string GetString([CallerMemberName] string? name = null) + { + using var stream = GetStream(name); + using var reader = new StreamReader(stream); + return reader.ReadToEnd(); + } + + private static Stream GetStream([CallerMemberName] string? name = null) + => Assembly.GetExecutingAssembly().GetManifestResourceStream($"Stars.Resources.{name}.txt") + ?? throw new ArgumentException($"Resource stream {name} does not exist", nameof(name)); +} \ No newline at end of file diff --git a/25_Chief/csharp/Resources/ShutUp.txt b/25_Chief/csharp/Resources/ShutUp.txt new file mode 100644 index 00000000..0b36668c --- /dev/null +++ b/25_Chief/csharp/Resources/ShutUp.txt @@ -0,0 +1 @@ +Shut up, pale face with wise tongue. \ No newline at end of file diff --git a/25_Chief/csharp/Resources/Title.txt b/25_Chief/csharp/Resources/Title.txt new file mode 100644 index 00000000..980d407d --- /dev/null +++ b/25_Chief/csharp/Resources/Title.txt @@ -0,0 +1,5 @@ + Chief + Creative Computing Morristown, New Jersey + + + diff --git a/25_Chief/csharp/Resources/Working.txt b/25_Chief/csharp/Resources/Working.txt new file mode 100644 index 00000000..75f1bf7a --- /dev/null +++ b/25_Chief/csharp/Resources/Working.txt @@ -0,0 +1,5 @@ +So you think you're so smart, eh? +Now watch. +{0}plus 3 equals{1}. This divided by 5 equals{2}; +This times by 8 equals{3}. If we divide by 5 and add 5, +we get{4}, which, minus 1, equals{5}.