I just successfully finished pset3 at CS50. It was pretty challenging! The final product is the “game of 15” one inputs a number for how size the board is, then it produces a board with all numbers and it allows the player to select a tile to move (must be adjacent to blank to work) replicating the “switching” that one does in the actual physical game. 🙂
Things I learned / internalized:
- Arrays on C must have a declared size, and this can’t really be adjusted later. An array is a string of memory, and you can’t just print an array like you do on python. To print it you need to do a loop that prints each individual term of the declared Array.
- One needs to be careful not to try access parts of memory not allocated not to get segmentation fault errors.
- Did my first C recursive program and loved it.
- Getting more and more comfortable with the initialization of variables 🙂
Lastly, this blog is being invaluable for me to keep track of where I am, what I have done etc… 1000 times better than taking notes on separate words or on paper or whatever. I am loving it.