rule: 新增 DEFAULT_RULE_NUMBER 宏

This commit is contained in:
Calcitem 2019-10-26 19:03:18 +08:00
parent 5b37ec783e
commit 25fa3e8dc7
3 changed files with 6 additions and 4 deletions

View File

@ -40,6 +40,8 @@
#define EMIT_COMMAND_DELAY (0)
#endif
#define DEFAULT_RULE_NUMBER 1
//#define HARD_LEVEL_DEPTH
//#define TIME_STAT

View File

@ -42,8 +42,8 @@ Game::Game()
}
#endif
// 默认选择第3号规则,即“莫里斯九子棋”
setPosition(&RULES[3]);
// 默认规则
setPosition(&RULES[DEFAULT_RULE_NUMBER]);
// 比分归零
score[BLACK] = score[WHITE] = score_draw = 0;

View File

@ -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);
// 重置游戏规则