Пример #1
0
void CubeSession::initCommandHandlers()
{
#define HAND(a) commandHandlers[#a] = &CubeSession::a##Handler
	HAND(auth);
	HAND(list_rooms);
	HAND(get_room_info);
	HAND(heartbeat);
#undef HAND
}
Пример #2
0
IPlayer::HAND BeatLast::GetNextHand(const HandsCollection& yourHistory,
                                    const HandsCollection& oppHistory)
{
   HAND result = GetRandomHand();

   if( !oppHistory.empty() )
   {
      result = HAND((oppHistory.back() + 1) % 3);
   }

   return result;
}