Add resources

This commit is contained in:
Andrew Cooper
2022-04-15 22:17:33 +10:00
parent 229084c492
commit 25dc10bf3f
12 changed files with 91 additions and 0 deletions

View File

@@ -0,0 +1 @@
What do you have

View File

@@ -0,0 +1 @@
Now do you believe me

View File

@@ -0,0 +1 @@
I bet your number was{0}. Am I right

View File

View File

@@ -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.

View File

@@ -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!!

View File

@@ -0,0 +1 @@
What was your original number

View File

@@ -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

View File

@@ -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));
}

View File

@@ -0,0 +1 @@
Shut up, pale face with wise tongue.

View File

@@ -0,0 +1,5 @@
Chief
Creative Computing Morristown, New Jersey

View File

@@ -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}.