mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 07:29:02 -08:00
41 lines
743 B
C#
41 lines
743 B
C#
using System;
|
|
|
|
namespace SuperStarTrek
|
|
{
|
|
internal class Output
|
|
{
|
|
internal Output Write(string text)
|
|
{
|
|
Console.Write(text);
|
|
return this;
|
|
}
|
|
|
|
internal Output Write(string format, params object[] args)
|
|
{
|
|
Console.Write(format, args);
|
|
return this;
|
|
}
|
|
|
|
internal Output WriteLine(string text = "")
|
|
{
|
|
Console.WriteLine(text);
|
|
return this;
|
|
}
|
|
|
|
|
|
internal Output NextLine()
|
|
{
|
|
Console.WriteLine();
|
|
return this;
|
|
}
|
|
|
|
|
|
internal Output Prompt(string text = "")
|
|
{
|
|
Console.Write($"{text}? ");
|
|
return this;
|
|
}
|
|
|
|
}
|
|
}
|