formatPrint function

void formatPrint(
  1. List<int> arr
)

Implementation

void formatPrint(List<int> arr) {
  int element;
  String out = "";
  for (int index = 0; index < arr.length; ++index) {
    element = arr[index];
    if (index % 9 == 0) {
      out += "\n";
      if ((index ~/ 9) % 3 == 0 && index != 0) {
        out += "\n";
      }
    }
    out += '${element == -1 ? "." : element} ${(index + 1) % 3 == 0 ? "\t" : ""}';
  }
  print(out);
}