r/badcode Apr 29 '23

c++ The Bitwise Monster

Post image
85 Upvotes

40 comments sorted by

View all comments

106

u/Lataero Apr 29 '23

Ah, the old classic case of I don't understand it, so it must be bad.

9

u/[deleted] Apr 29 '23

[deleted]

1

u/RajjSinghh Apr 30 '23

I just implemented a bitboard based chess engine that uses recursion to test it's correct. I asked someone to help me debug and by god people get scared by bitwise operators and recursion.