{ "boardWidth", ArgInt, (void *) &appData.NrFiles, TRUE, (ArgIniType) -1 },
{ "boardHeight", ArgInt, (void *) &appData.NrRanks, TRUE, (ArgIniType) -1 },
{ "holdingsSize", ArgInt, (void *) &appData.holdingsSize, TRUE, (ArgIniType) -1 },
+ { "defaultMatchGames", ArgInt, (void *) &appData.defaultMatchGames, TRUE, (ArgIniType) 10 },
{ "matchPause", ArgInt, (void *) &appData.matchPause, TRUE, (ArgIniType) 10000 },
{ "pieceToCharTable", ArgString, (void *) &appData.pieceToCharTable, FALSE, INVALID },
{ "pieceNickNames", ArgString, (void *) &appData.pieceNickNames, FALSE, INVALID },
extern int gotPremove;
extern GameMode gameMode;
+extern int matchMode;
+extern int matchGame;
extern int pausing, cmailMsgLoaded, flipView, mute;
extern char white_holding[], black_holding[];
extern int currentMove, backwardMostMove, forwardMostMove;
int defaultHashSize;
int defaultCacheSizeEGTB;
char * defaultPathEGTB;
+ int defaultMatchGames;
/* [HGM] Board size */
int NrFiles;
#define IDM_TypeInName 185 \r
#define IDM_MachineBoth 186 \r
#define IDM_MuteSounds 187\r
+#define IDM_Match 188\r
#define OPT_TCtext1 202\r
#define OPT_TCTime 203\r
#define OPT_TCtext2 204\r
#define IDC_Cores 1473\r
#define IDC_BookDep 1474\r
#define IDC_BookStr 1475\r
+#define IDC_Games 1476\r
#define DLG_NewVariant 1500\r
#define OPT_VariantGothic 1501\r
#define OPT_VariantCrazyhouse 1502\r
SAY("computer starts playing black");\r
break;\r
\r
+ case IDM_Match: // [HGM] match: flows into next case, after setting Match Mode and nr of Games\r
+ if(gameMode != BeginningOfGame) break; // allow menu item to remain enabled for better mode highligting\r
+ matchMode = 2;// distinguish from command-line-triggered case (matchMode=1)\r
+ appData.matchGames = appData.defaultMatchGames;\r
+ matchGame = 1;\r
+\r
case IDM_TwoMachines:\r
TwoMachinesEvent();\r
/*\r
{ IDM_MachineWhite, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_MachineBlack, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_TwoMachines, MF_BYCOMMAND|MF_GRAYED },\r
+ { IDM_Match, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_MachineBoth, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_AnalysisMode, MF_BYCOMMAND|MF_ENABLED },\r
{ IDM_AnalyzeFile, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_MachineWhite, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_MachineBlack, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_TwoMachines, MF_BYCOMMAND|MF_GRAYED },\r
+ { IDM_Match, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_AnalysisMode, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_AnalyzeFile, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_IcsClient, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_MachineWhite, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_MachineBlack, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_TwoMachines, MF_BYCOMMAND|MF_GRAYED },\r
+ { IDM_Match, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_TypeInMove, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_RetractMove, MF_BYCOMMAND|MF_GRAYED },\r
{ -1, -1 }\r
{ IDM_MachineWhite, MF_BYCOMMAND|MF_ENABLED },\r
{ IDM_MachineBlack, MF_BYCOMMAND|MF_ENABLED },\r
{ IDM_TwoMachines, MF_BYCOMMAND|MF_ENABLED },\r
+ { IDM_Match, MF_BYCOMMAND|MF_ENABLED },\r
{ IDM_TypeInMove, MF_BYCOMMAND|MF_ENABLED },\r
{ IDM_RetractMove, MF_BYCOMMAND|MF_ENABLED },\r
{ -1, -1 }\r
nowChecked = IDM_MachineWhite;\r
break;\r
case TwoMachinesPlay:\r
- nowChecked = IDM_TwoMachines;\r
+ nowChecked = matchMode ? IDM_Match : IDM_TwoMachines; // [HGM] match\r
break;\r
case AnalyzeMode:\r
nowChecked = IDM_AnalysisMode;\r
} else if (gameMode == MachinePlaysWhite) {\r
(void)EnableMenuItem(hMenu, IDM_MachineWhite, flags);\r
} else if (gameMode == TwoMachinesPlay) {\r
- (void)EnableMenuItem(hMenu, IDM_TwoMachines, flags);\r
+ (void)EnableMenuItem(hMenu, matchMode ? IDM_Match : IDM_TwoMachines, flags); // [HGM] match\r
}\r
}\r
\r
EDITTEXT IDC_BookDep,162,94,40,14,ES_AUTOHSCROLL\r
LTEXT "Book Variation:",IDC_STATIC,106,116,52,8\r
EDITTEXT IDC_BookStr,162,112,40,14,ES_AUTOHSCROLL\r
+ LTEXT "Default Match Games:",IDC_STATIC,2,135,72,8\r
+ EDITTEXT IDC_Games,76,131,28,14,ES_AUTOHSCROLL\r
DEFPUSHBUTTON "OK",IDOK,118,142,50,14\r
PUSHBUTTON "Cancel",IDCANCEL,174,142,50,14\r
END\r
MENUITEM "Machine &White\tCtrl+W", IDM_MachineWhite\r
MENUITEM "Machine &Black\tCtrl+B", IDM_MachineBlack\r
MENUITEM "Two &Machines\tCtrl+T", IDM_TwoMachines\r
- MENUITEM "Machine Bot&h", IDM_MachineBoth\r
+ MENUITEM "Machine Both", IDM_MachineBoth\r
+ MENUITEM "Machine Matc&h", IDM_Match\r
MENUITEM "&Analysis Mode\tCtrl+A", IDM_AnalysisMode\r
MENUITEM "Analyze &File\tCtrl+F", IDM_AnalyzeFile\r
MENUITEM "&ICS Client", IDM_IcsClient\r
CheckDlgButton( hDlg, IDC_OwnBook2, (BOOL) appData.secondHasOwnBookUCI );\r
SetDlgItemInt( hDlg, IDC_BookDep, appData.bookDepth, TRUE );\r
SetDlgItemInt( hDlg, IDC_BookStr, appData.bookStrength, TRUE );\r
+ SetDlgItemInt( hDlg, IDC_Games, appData.defaultMatchGames, TRUE );\r
\r
SendDlgItemMessage( hDlg, IDC_PolyglotDir, EM_SETSEL, 0, -1 );\r
\r
appData.secondHasOwnBookUCI = (Boolean) IsDlgButtonChecked( hDlg, IDC_OwnBook2 );\r
appData.bookDepth = GetDlgItemInt(hDlg, IDC_BookDep, NULL, FALSE );\r
appData.bookStrength = GetDlgItemInt(hDlg, IDC_BookStr, NULL, FALSE );\r
+ appData.defaultMatchGames = GetDlgItemInt(hDlg, IDC_Games, NULL, FALSE );\r
\r
if(gameMode == BeginningOfGame) Reset(TRUE, TRUE);\r
EndDialog(hDlg, TRUE);\r