100 Days of Code Day 41
Today’s exercise was Spiral Matrix you start at 0,0 and go around and around plotting numbers until you reach the center turning when you get to a plotted number or edge (I just shrunk the range you can move through as I went). I think mine would still work on rectangles. I saw cleaner and shorter community solutions but I think mine is more intentional and readable.
The spiral took me longer than expected so for 2048 I only got the tiles drawn a little nicer. I will probably use that to draw ok/cancel buttons too. Looks nicer but not great. Why does SDL2 not have a filled triangle drawing primitive? Anyway it doesn’t look great, but it doesn’t strain the eyes anymore.
