From 812485bd231787decc3d1b4ba283b64faee522bd Mon Sep 17 00:00:00 2001 From: Coding with Tom <146443103+hcsalmon1@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:09:56 +0000 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c87cb48..41e5b6b 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,15 @@ This is where the code extracted into functions and made clearer. However this a I normally don't code this way. I extract functions and hate over nesting. I only did it here to maximize performance. +Another reason why I didn't extract functions and refactor is because you create the most amount of bugs imaginable with a project like this. +One small flaw in logic and you can break the entire thing: +-Did you change sides correctly? +-Should you use the WHITE_OCCUPANCIES or BLACK_OCCUPANCIES when searching for pins? +-Did you use WHITE_PAWN_ATTACKS to look for a black pawn check and BLACK_PAWN_ATTACKS to look for a white pawn check? +-Does en passant work? +-Does castling work correctly? Does the king go through check? +-Do pins work correctly? Was the king captured? - - +In the C# clean version folder I also added my debug perft. This is what you can use to debug any changed you make to make sure you don't have bugs. +With so much debugging you can find almost any bug you create while refactoring.