Close

Update: code optimization

A project log for Electronic Mancala++

Updated version of my Electronic Mancala Board that uses a ATtiny3224 microcontroller

zachary-murtishiZachary Murtishi 02/03/2025 at 23:420 Comments

I went and optimized some of the code to remove some unnecessary memory usage from the code + changed some of the code around to be less dependent on global variables. In a few functions, I had the game table global variable hardcoded - this has since been changed to the function taking the gameTable as a pointer and operating on its addresses that way. I removed the need for having to generate new arrays to run the isEmpty and sum functions - instead, I just add an offset to the game state's address and provide a manual length calculation for each. So far, it looks like it works.

Discussions