#zettel #gaming #programming/readable-code # Balatro's code is full of if-else statements, but this is not bad because it is easily readable ![](https://external-preview.redd.it/how-is-it-possible-that-the-balatro-dev-did-something-like-v0-nSgXzsga1RMDN_gwrjGtUdzqCmzfqTrOYRjtfuqNk10.jpg?auto=webp&s=a696b64ceccf3a79e7353cd6b65de388303bbf13) Yeah, having a bunch of if-else statements in your code ain't great in terms of code efficiency, but damn if it ain't easy to read. Some people are lamenting that this makes [[Balatro]] as a game difficult to evolve, to change its mechanics over time. But is that really necessary? The concept and gameplay mechanics are very easy to understand, and this code makes it pretty easy to add new Jokers (effects) to the game without changing the core gameplay loop. ## Related Thoughts: - [[YAGNI]], only implement what you will need, and not any additional bits until they become necessary. - This code is not running more than once every few seconds, so it can be "inefficient". It does what it needs to do well.