toChar method

String toChar()

Render as text

Implementation

String toChar() {
  assert(index >= Suit.Club.index && index <= Suit.Spade.index);
  return ['c', 'd', 'h', 's'][index - 1];
}