Files
Blackjack/BlackJ/Art.cs
2025-09-16 10:20:05 +02:00

48 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using BlackJack;
namespace BlackJack
{
public class Art
{
private Dictionary<string, string[]> artCollection = new Dictionary<string, string[]>()
{
{ "boat", new string[]
{
" .",
" ___ | _:______",
" : _`&_'&___| [] [] [] |_&______",
" | o o o o o o o o /",
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
}
},
};
public void Print(string name)
{
if (artCollection.TryGetValue(name.ToLower(), out string[] artLines))
{
foreach (var line in artLines)
{
Console.WriteLine(line);
}
}
else
{
Console.WriteLine($"No art found for '{name}'");
}
}
public string[] GetArt(string name)
{
if (artCollection.TryGetValue(name.ToLower(), out string[] artLines))
{
return artLines;
}
else
{
return null;
}
}
}
}