Add project files.

This commit is contained in:
eritib08
2025-09-16 10:20:05 +02:00
parent 42e8b1fddf
commit 52576e3416
12 changed files with 640 additions and 0 deletions

47
BlackJ/Art.cs Normal file
View File

@@ -0,0 +1,47 @@
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;
}
}
}
}