mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-05-06 05:17:32 -05:00
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace PkmnFoundations.Structures
|
|
{
|
|
public static class Format
|
|
{
|
|
private static String[] m_marks = new String[] { "●", "▲", "■", "♥", "★", "♦" };
|
|
|
|
public static String Markings(Markings markings, String trueFormat, String falseFormat, String delimiter)
|
|
{
|
|
StringBuilder result = new StringBuilder();
|
|
int marking = 1;
|
|
for (int value = 0; value < 6; value++)
|
|
{
|
|
if (marking > 1) result.Append(delimiter);
|
|
String format = (((int)markings & marking) != 0) ? trueFormat : falseFormat;
|
|
result.Append(String.Format(format, m_marks[value]));
|
|
|
|
marking <<= 1;
|
|
}
|
|
|
|
return result.ToString();
|
|
}
|
|
|
|
public static String GenderSymbol(Genders gender)
|
|
{
|
|
switch (gender)
|
|
{
|
|
case Genders.Male:
|
|
return "♂";
|
|
case Genders.Female:
|
|
return "♀";
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
}
|