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