[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pbmserv-dev] keeping constants with the board
Take a look at the blackout code. I made a list for miscellaneous
variables and defined an enum to index it. When I read the board, I
copy that list into a plain array for easy access, and when I write
the board, I copy that array back into the list before writing.
typedef enum _miscinfoindex{round = 0, trump, eldest, hook, visible, dealer,version } MISCINFOINDEX;
class MiscInfo : public ReadWriteIntList
{
const char *Name(void) { return "miscinfo"; }
};
...
protected:
MiscInfo miscinfolist;
int miscinfo[20];
--
Ted Rathkopf