Add project files.
This commit is contained in:
47
BlackJ/Art.cs
Normal file
47
BlackJ/Art.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user