export function flatten<T>(grid: T[][]) {
  const flattened = [] as T[];
  for (const row of grid) {
    flattened.push(...row);
  }
  return flattened;
}
