toChar method

String toChar()

Render as text

Implementation

String toChar() {
  assert(index >= Rank.LowAce.index && index <= Rank.Ace.index);
  return [
    'A',
    '2',
    '3',
    '4',
    '5',
    '6',
    '7',
    '8',
    '9',
    'T',
    'J',
    'C',
    'Q',
    'K',
    'A',
  ][index - 1];
}