Code Quality
Bug #837154 reported by
Joseph Cassman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mu-chess |
Fix Released
|
High
|
Unassigned |
Bug Description
Need to improve the confidence in the quality of the code. Its accuracy. In particular need to understand assumptions throughout the code. Add comments, function and class contracts, and runtime checks where helpful.
Related branches
description: | updated |
To post a comment you must log in.
As of revision 62 FEN deserialization (i.e. board setup) and move generation are much more reliable. In particular, in the last couple of revisions I have been able to update the code to determine and keep track of which side is in-check. This will eventually effect move generation by determining the algorithm to use (i.e. get-out-of-check versus normal movegen). At the moment, the information is used to analyze move legality.
I am working on an idea to generate an HTML page to show visually the results of movegen. I want to see a board representation of the result of making each move as opposed to just seeing the SAN encoded move text or the FEN encoding of the board. This should make tracking down of elusive bugs much easier. We'll see how it works out.
Overall, most of the code has contracts. I duplicated the contract preconditions using Debug.Assert statements to make it easier to use them in current IDE's.
I cannot see any big changes to the code architecture for this branch. Unless testing shows otherwise I am going to finish it with trying to get movegen on-line.