Client for playing 300 publicly available Sokoban puzzles on a computer or phone.

keep one screen line of overlap on pagedown

I'm now extracting the concern of computing line.screen_line_starting_pos out of Text.draw. Earlier I had to make sure I ran through the whole line to compute screen_line_starting_pos, but that had the side-effect of updating Screen_bottom1.pos as well with lines that had never been rendered.

In this process I hit my first bug due to an accidental global. It doesn't show up in the patch because I accidentally deleted a local declaration. (I thought I didn't need screen_line_starting_pos anymore, deleted everywhere, then brought it back everywhere from the bottom of the function up, but forgot to put back the very first occurrence.)

The amount of yoyoing this caused between App.draw and Text.draw, I very much have spaghetti on my hands.

Accidental globals are terrible in a program with tests. Cross test contamination X-(

Created by  Kartik K. Agaram  on May 24, 2022
LERERVPHE5SEWDHQ7IAGQSXUAI2QHQJ33NBNRMRXZ34X7P23I2IAC
Change contents