mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 07:29:02 -08:00
24 lines
593 B
C#
24 lines
593 B
C#
namespace SuperStarTrek.Commands
|
|
{
|
|
internal class CommandResult
|
|
{
|
|
public static readonly CommandResult Ok = new(false);
|
|
public static readonly CommandResult GameOver = new(true);
|
|
|
|
private CommandResult(bool isGameOver)
|
|
{
|
|
IsGameOver = isGameOver;
|
|
}
|
|
|
|
private CommandResult(float timeElapsed)
|
|
{
|
|
TimeElapsed = timeElapsed;
|
|
}
|
|
|
|
public bool IsGameOver { get; }
|
|
public float TimeElapsed { get; }
|
|
|
|
public static CommandResult Elapsed(float timeElapsed) => new(timeElapsed);
|
|
}
|
|
}
|