[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [pbmserv-dev] Determine if submit mode in PrintBoardAs



> Anyway, the preview command already had an is_previewing flag that I
was able to use.  Maybe I should just put in a similar is_submitting for
the submit command?

That would be a more generic solution. Then any game could easily take
advantage of it. Overriding PrintAs (if it is made virtual) is easy, but
I see a good/bad side to making Game::PrintAs virtual:

Good -> Games could override it if they really *need* a totally
different board layout. I know I had thought of some games to implement
where I'd like a differnet previous moves display that is currently not
possible, but by overriding PrintAs (and repeating most of the code) it
would be doable, although not pretty.

Bad -> By allowing games to override PrintAs, it gives up the intregity
of the initial board display (initial wording, etc). If someone were to
override PrintAs, and NOT call the original, but instead repeat most of
it with some small changes, that wouldn't be good if Richard ever wanted
to change the PrintAs that every game uses.

Maybe at some point the code that prints the moves could be broken out
into a separate routine and made virtual, so games to re-implement that
portion if they wanted to. Not a priority for me right now until I
remember what game it was I was thinking about doing that I couldn't
because of the moves printout design :)