At some point you have to draw the line and limit yourself. You can't design something that will play everything.Greg Strong wrote: Having the engine direct the GUI is contrary to my primary approach - the GUI knows everything and enforces everything. I've spent literally years coming up with the best object-oriented architecture I could devise to make addition of new variants as simple as possible. Pieces, boards, rules, are practically plug-and-play (or as close as I can get.) Adding support for the overwhelming majority of variants should take a matter of minutes.
That said, adding all variants isn't likely to happen, particularly really strange ones, so allowing it to go the other way, (the engine knows the rules and gives low-level directions to the GUI), makes sense as an alternative. I will need to add some sort of "alien mode" for supporting arbitrary variant the GUI doesn't know about. This isn't likely to be in the first version, though. All the winboard-automation code is ported from CuteChess, which wasn't designed with this kind of communication envisioned, although the CuteChess code is super object-oriented and well-designed (which is why I chose it) so it should't be too bad.
For SjaakII my design decisions and limitations were
- Up to 16 ranks or files, boards with up to 128 squares
- Up to 16 piece types (later expanded to 32)
- Indeterminate number of royals
- No build-in preconceptions of piece types
- Allow drop moves
- Pieces are leapers, sliders or steppers (=restricted WF sliders), or compounds
- No location-dependent move options and restrictions, with one possible exception per piece (to accommodate pawn pushes and castling moves)
- Flexible promotion zones
- Different rule options can be activated independently (repetitions allowed/not allowed, drops allowed/not allowed, pawns can be dropped to give mate or not...)
- All information needed to make a move must be encoded in a 64 bit integer