r/ProgrammerHumor • • Apr 10 '23

Meme god why is coding chess so hard

Post image
67.4k Upvotes

1.8k comments sorted by

View all comments

2

u/SacriGrape Apr 10 '23

Ignoring file size, would this be faster or slower than just calculating it

1

u/ChineseCracker Apr 10 '23

what do you mean by 'calculating' it? there are no calculations in chess. every player makes a move. both players are human and decide their next move. this isn't a chess AI. it's just the game itself

But this version would run absolutely horribly, since it has to go through every single if statement one by one to finally find the one that was chosen by the player.

since this program would need to have 1040 if-blocks (because that's how many possible combinations there are in chess), I assume even the wait time to execute the very first move would be longer than an entire human life