diff --git a/include/config.h b/include/config.h index ba2364fb..bd3744b9 100644 --- a/include/config.h +++ b/include/config.h @@ -40,6 +40,8 @@ #define EMIT_COMMAND_DELAY (0) #endif +#define DEFAULT_RULE_NUMBER 1 + //#define HARD_LEVEL_DEPTH //#define TIME_STAT diff --git a/src/game/position.cpp b/src/game/position.cpp index 53d59ce5..3ea3f67c 100644 --- a/src/game/position.cpp +++ b/src/game/position.cpp @@ -42,8 +42,8 @@ Game::Game() } #endif - // 默认选择第3号规则,即“莫里斯九子棋” - setPosition(&RULES[3]); + // 默认规则 + setPosition(&RULES[DEFAULT_RULE_NUMBER]); // 比分归零 score[BLACK] = score[WHITE] = score_draw = 0; diff --git a/src/ui/qt/gamewindow.cpp b/src/ui/qt/gamewindow.cpp index 6a256c0f..a19057eb 100644 --- a/src/ui/qt/gamewindow.cpp +++ b/src/ui/qt/gamewindow.cpp @@ -270,8 +270,8 @@ void MillGameWindow::initialize() connect(gameController, SIGNAL(statusBarChanged(QString)), statusBarlabel, SLOT(setText(QString))); - // 默认第3号规则 - ruleNo = 3; + // 默认规则 + ruleNo = DEFAULT_RULE_NUMBER; ruleActionList.at(ruleNo)->setChecked(true); // 重置游戏规则