本文整理汇总了C++中UserCommand::get_notation方法的典型用法代码示例。如果您正苦于以下问题:C++ UserCommand::get_notation方法的具体用法?C++ UserCommand::get_notation怎么用?C++ UserCommand::get_notation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserCommand
的用法示例。
在下文中一共展示了UserCommand::get_notation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
bool
UserCommandExecuter::execute (const UserCommand& command)
{
switch (command.get_key ())
{
case UserCommand::NEW_GAME:
this->board->reset ();
break;
case UserCommand::UNDO_MOVE:
this->board->undo_move ();
break;
case UserCommand::REMOVE:
this->board->undo_move ();
this->board->undo_move ();
break;
case UserCommand::SEE_MOVES:
show_possible_moves ();
break;
case UserCommand::USER_MOVE:
make_user_move (command.get_notation ());
break;
case UserCommand::FEATURES:
cout << "feature setboard=1 usermove=1 time=0 draw=0 sigint=0 "
<< "sigterm=0 variants=\"normal\" analyze=0 colors=0 "
<< "myname=\"MaE\" done=1" << std::endl;
break;
case UserCommand::XBOARD_MODE:
cout << std::endl;
break;
case UserCommand::THINK:
think ();
break;
case UserCommand::TRAIN:
train_by_genetic_algorithm (
/* population_size: */ 6,
/* generations_count: */ 15,
/* mutation_probability: */ 0.004);
break;
default:
break;
}
return true;
}