tomas/src/Tomas.Common/Programs/FenSay.cs
Tony Bark 4f0863f429 Start() in IProgram has been renamed to Run()
- Run() loop in the shell is now wrapped in a try-catch statement.
- Added Github CI
- Removed OSConsts and TermConsts
- Programs can now access the programs dictionary directly from the shell
2021-03-31 00:10:38 -04:00

42 lines
No EOL
1 KiB
C#

// I license this project under the GPL 3.0 license.
// See the LICENSE file in the project root for more information.
using System;
using Tomas.Interface;
namespace Tomas.Common.Programs
{
public class FenSay : IProgram
{
/// <summary>
/// Fennec art by Todd Vargo
/// </summary>
const string _fennec = @" \/
/\ /\
//\\_//\\ ____
\_ _/ / /
/ * * \ /^^^]
\_\O/_/ [ ]
/ \_ [ /
\ \_ / /
[ [ / \/ _/
_[ [ \ /_/";
readonly string[] _phrases =
{
"[SCREAMS IN FENNEC]",
"Some people call me a coffee fox.",
"Drink Soda. It makes you see faster.",
"10/10, Wouldn't Recommend."
};
public bool Run(IShell shell)
{
var rng = new Random();
var phrases = _phrases[rng.Next(_phrases.Length)];
Console.WriteLine($"{phrases}{Environment.NewLine}{_fennec}");
return true;
}
}
}