Can you see the incredibly simple #ComputerScience 101 #bug in this code? Because I just spent the better part of a Sunday banging my head before figuring it out 🤦♂️
#Programming alone and having full control over your #GameDev codebase is great most of the time, but sometimes you just need a second set of eyes to reveal your blind spots.
AI assistants can be surprisingly helpful with this actually... I had one catch that I misspelled a variable (yay python) that I just didn't see.
@LouisIngenthron it breaks at least 2 of my rules: USE INTERMEDIATE VARIABLES and ONLY USE INT FOR INT THINGS. I suspect the bug is from the former but I’d advise using an enum for rot if it can only have 4 values. I might even make a Rot type that encapsulates each case as a method and remove the switch by just calling a method in Rot ‘cos REDUCE CONDITIONAL CODE. And write tests. Lots of tests.