I was getting so many bugs converting this, so decided to go full bug checking mode.
Timestamps:
0:00 Original spaghetti code
0:41 list of errors
1:12 All the error checking
4:09 getMoves error checking
4:28 How I neatened up getMoves
5:08 more perft error checking
8:06 Running the code and error examples
13:57 Why this project is so bug prone
16:04 How to do this in other languages
20:40 Summary