ASCII Masks

Learn how to create an ASCII mask in a separate file and feed that file to our program.

Introducing ASCII masks

Imagine if we could “draw” our masks in a separate file and feed that file to our program. We could play with all kinds of designs without having to change our program at all! Let’s make that happen using simple text files as input. The text files will be formatted something like the following, which shows one possible definition of a 10x10 grid.

mask.txt

Get hands-on with 1400+ tech skills courses.