Exemple #1
0
 /// <summary>
 /// Render grid in a display-friendly way
 /// </summary>
 /// <returns>List of strings, one line for each row of the board</returns>
 public List <string> Render()
 {
     return
         (Markers.Aggregate(
              new List <string>(),
              (result, row) =>
     {
         result.Add(
             row.Aggregate(
                 new StringBuilder(),
                 (sb, marker) => sb.Append($"[{marker}] ")
                 ).ToString()
             );
         return result;
     }
              ));
 }