mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-23 01:49:18 -08:00
Encapsulate formulae
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace Chief;
|
||||
|
||||
internal static class IReadWriteExtensions
|
||||
{
|
||||
internal static bool ReadYes(this IReadWrite io, string format, float value) =>
|
||||
io.ReadYes(string.Format(format, value));
|
||||
internal static bool ReadYes(this IReadWrite io, string prompt) =>
|
||||
io.ReadString(prompt).Equals("Yes", StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
Reference in New Issue
Block a user