Friday, October 29, 2004

Progress...but daunting challenges loom

I finished the transition to class based pieces and got all 32 tests passing! I then started on checkmate. After some false starts I got most cases done without much effort. After talking to a friend I realized that I was still missing quite a few tests (checkmate because a piece is pinned, stalemate, 3 repeated positions anytime, 50 moves without a pawn move or capture). Whew and I thought I was almost done with the chess rules!!! These aren't going to real easy. I am especially worried about the repetition one because I must keep copies of boards. If I just copy my current ChessBoard then I have to copy the pieces as well...that isn't going to work. All I really need is a simple Position class I think...enough designing I don't have any tests failing yet ;-)

I now have 914 lines of code (BTW this doesn't include the GUI) of which 532 lines are test code. 38 tests and they all pass (for now ;-)

No comments: