Artifact.fromAsciiWithNewlines constructor

Artifact.fromAsciiWithNewlines(
  1. String input
)

Creates a Matrix from a multi-line ASCII string representation.

This factory method splits the input string by newline characters and creates a matrix where '#' represents true and any other character represents false.

Parameters:

  • input: A string containing newline-separated rows of ASCII characters.

Returns: A new Artifact instance representing the ASCII pattern.

Implementation

factory Artifact.fromAsciiWithNewlines(final String input) {
  final List<String> template = input.split('\n');
  final Artifact artifact = Artifact.fromAsciiDefinition(template);
  return artifact;
}