Stefan,
The code is not just a "mathematical calculation", it produces real, physical images of "coins" on your computer screen, that you can see with your real physical eyes, and photograph with your real physical camera. Feel free to analyze your own photographs of them, if you think it will produce a different result than just analyzing the images produced on the screen. Better still, feel free to 3D-print the images, to make real, physical coins, then analyze those coins, if you believe it will make a difference.
You seem to not comprehend that Bell's theorem, is a theorem. Theorems are merely statements in symbolic logic, not physical theories. The only thing that makes any theorem take on any relevance to physics, is the axioms it is founded upon; if the axioms have relevance, then the theorem does. Otherwise it does not. So the question is, do Bell's axioms, including his unstated, idealistic assumptions, of (1) perfectly identical particles and (2) perfect (error free) detection, have any relevance in the real world?
What the code demonstrates, is that some peculiar, real "particles", that violate Bell's unstated, idealistic assumptions, will also violate his theoretical claim that no real classical particles can violate the theorem. In other words, Bell tests amount to nothing more than a "reduction to an absurdity" demonstration, of the falsity of Bell's assumptions. Rather than proving that the quantum realm is "absurd", the entire 50 year history of Bell's theorem and associated tests, merely proves that his assumptions regarding the existence of "perfect" particles and perfect detectors, are absurd, idealistic caricatures, of the behavior of some "real" particles and real detectors (the detector in the code, is a real, commonly-used, signal processing detector - a matched filter).
Rob McEachern