mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-29 22:21:42 -08:00
Update 62_Mugwump
This commit is contained in:
13
62_Mugwump/csharp/TextIOExtensions.cs
Normal file
13
62_Mugwump/csharp/TextIOExtensions.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Mugwump;
|
||||
|
||||
// Provides input methods which emulate the BASIC interpreter's keyboard input routines
|
||||
internal static class TextIOExtensions
|
||||
{
|
||||
internal static Position ReadGuess(this TextIO io, string prompt)
|
||||
{
|
||||
io.WriteLine();
|
||||
io.WriteLine();
|
||||
var (x, y) = io.Read2Numbers(prompt);
|
||||
return new Position(x, y);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user