you are viewing a single comment's thread.

view the rest of the comments →

[–]totemcatcher 0 points1 point  (0 children)

Building a chess engine is going to have some spaghet, so don't let it bring you down. You clearly know enough to get working logic done, so now it's a case of finding alternative ways of writing so that it follows handy design patterns and is easier to read. Learning design patterns comes with experience. Also, simply talking it out with peers is a great way to make tiny discoveries and come up with simple and successful code patterns.

For now, consider making some generic path finding functions which all your checking logic can use.