Ohh and when I said that I shouldn’t have used my own solutions, I was talking about the way I handled computing legal moves, checking for “Checks”, and even the way I coded the board.
A week before the deadline, I lost hope of making it any faster by myself, so I started searching for how other people did it, and I saw a ton of great optimization tricks that would require me to rewrite a huge chuck of the code, as it changes the underlying mechanics, so I couldn’t use them.
I didn’t search before not out of laziness, but of stubbornness, insisting that I can figure it out on my own. Lesson learning the hard way.
Yeah I wrote a chess game before and calculating legal moves was a nightmare. Especially with knights, castling, and en passant and other obscure rules. And I did not write that very cleanly, I think I had 1700 lines of code in that file.
Ohh and when I said that I shouldn’t have used my own solutions, I was talking about the way I handled computing legal moves, checking for “Checks”, and even the way I coded the board.
A week before the deadline, I lost hope of making it any faster by myself, so I started searching for how other people did it, and I saw a ton of great optimization tricks that would require me to rewrite a huge chuck of the code, as it changes the underlying mechanics, so I couldn’t use them.
I didn’t search before not out of laziness, but of stubbornness, insisting that I can figure it out on my own. Lesson learning the hard way.
Yeah I wrote a chess game before and calculating legal moves was a nightmare. Especially with knights, castling, and en passant and other obscure rules. And I did not write that very cleanly, I think I had 1700 lines of code in that file.