mirror of
https://github.com/tonytins/tomas.git
synced 2025-04-30 03:31:39 -04:00
- 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
42 lines
No EOL
1 KiB
C#
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;
|
|
}
|
|
}
|
|
} |