Global variables annoy me
Global variables annoy me
Today was a lot of debugging and more framework - almost all of the code I wrote in funcs.py was bugged in some way. My linearize and delinearize methods both were switching around what x and y mean, since I was thinking mathematically where x is horizontal and y is vertical, but since I was taking an x index before a y index, they should’ve been switched. After fixing those bugs and some more bugs in my adjacency map generator, I got those working, and laid out the framework for the first searching algorithm I’ll actually implement - Depth First Search. The attached screenshot shows the adjacency map with all bugs fixed.
Today I created the framework of my project - I started off with making two “maps” (the second one looks like the underscores and periods you see on the left), and coded something that randomly selects a map and generates a more visual image like the one seen. I also got started on a funcs.py file that’ll have a bunch of essential functions, such as taking a 2D array that represents a grid and making it an adjacency map (which’ll be useful for the first search algorithm I’m going to implement, depth first search).