Basically I want to do this:
What's happening:
1. an array of pixels drawn as a 2d square exists
2. a randomly drawn line from one side to the other (also works if it loops back to the same side) shows where pixels have been removed
3. the square array is split into two smaller arrays of half-ish squares
How can I do this in code? The things can be anything from numbers to characters to sprites
Another diagram I drew in paint in case the previous one is too small:

What's happening:
1. an array of pixels drawn as a 2d square exists
2. a randomly drawn line from one side to the other (also works if it loops back to the same side) shows where pixels have been removed
3. the square array is split into two smaller arrays of half-ish squares
How can I do this in code? The things can be anything from numbers to characters to sprites
Another diagram I drew in paint in case the previous one is too small:

