using Games.Common.Numbers;
namespace Games.Common.IO;
///
/// Provides for input and output of strings and numbers.
///
public interface IReadWrite
{
///
/// Reads a character from input.
///
/// The character read.
char ReadCharacter();
///
/// Reads a value from input.
///
/// The text to display to prompt for the value.
/// A , being the value entered.
float ReadNumber(string prompt);
///
/// Reads 2 values from input.
///
/// The text to display to prompt for the values.
/// A , being the values entered.
(float, float) Read2Numbers(string prompt);
///
/// Reads 3 values from input.
///
/// The text to display to prompt for the values.
/// A , being the values entered.
(float, float, float) Read3Numbers(string prompt);
///
/// Reads 4 values from input.
///
/// The text to display to prompt for the values.
/// A , being the values entered.
(float, float, float, float) Read4Numbers(string prompt);
///
/// Read numbers from input to fill an array.
///
/// The text to display to prompt for the values.
/// A to be filled with values from input.
void ReadNumbers(string prompt, float[] values);
///
/// Reads a value from input.
///
/// The text to display to prompt for the value.
/// A , being the value entered.
string ReadString(string prompt);
///
/// Reads 2 values from input.
///
/// The text to display to prompt for the values.
/// A , being the values entered.
(string, string) Read2Strings(string prompt);
///
/// Writes a to output.
///
/// The to be written.
void Write(string message);
///
/// Writes a to output, followed by a new-line.
///
/// The to be written.
void WriteLine(string message = "");
///
/// Writes a to output.
///
/// The to be written.
void Write(Number value);
///
/// Writes a to output.
///
/// The to be written.
void WriteLine(Number value);
///
/// Writes an to output.
///
/// The to be written.
void Write(object value);
///
/// Writes an to output.
///
/// The to be written.
void WriteLine(object value);
///
/// Writes a formatted string to output.
///
/// The format to be written.
/// The values to be inserted into the format.
void Write(string format, params object[] values);
///
/// Writes a formatted string to output followed by a new-line.
///
/// The format to be written.
/// The values to be inserted into the format.
void WriteLine(string format, params object[] values);
///
/// Writes the contents of a to output.
///
/// The to be written.
void Write(Stream stream, bool keepOpen = false);
}