getDieChr method

String getDieChr()

Get item is dead

Implementation

String getDieChr() {
  String fullChrs = initFen.replaceAll(RegExp(r'[1-9/]'), '');
  String currentChrs = getAllChr();
  if (fullChrs.length > currentChrs.length) {
    currentChrs.split('').forEach((chr) {
      fullChrs = fullChrs.replaceFirst(chr, '');
    });
    return fullChrs;
  }

  return '';
}