mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-06-22 14:51:43 -07:00
Add resources
This commit is contained in:
@@ -0,0 +1 @@
|
||||
What do you have
|
||||
@@ -0,0 +1 @@
|
||||
Now do you believe me
|
||||
@@ -0,0 +1 @@
|
||||
I bet your number was{0}. Am I right
|
||||
@@ -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.
|
||||
@@ -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!!
|
||||
@@ -0,0 +1 @@
|
||||
What was your original number
|
||||
@@ -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
|
||||
@@ -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));
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Shut up, pale face with wise tongue.
|
||||
@@ -0,0 +1,5 @@
|
||||
Chief
|
||||
Creative Computing Morristown, New Jersey
|
||||
|
||||
|
||||
|
||||
@@ -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}.
|
||||
Reference in New Issue
Block a user