Пример #1
0
void give_card(CHAR_DATA *ch)
{
  CARD_DATA *newcard;
  char buf[MAX_STRING_LENGTH];
  bool nCard=TRUE;
  sh_int i;

  if(ch->hand[4] != NULL)
  {
    sprintf(buf,"attempt to give %s another cardwith a full hand",ch->name);
    bug(buf);
    return;
  }

  for( i=0, i<5, i++)
  {
    if(ch->hand[i] == NULL)
      break;
  }

  while(nCard)
  {
    newcard = gen_card();
    if(!has_card(ch,newcard)) 
bool CardCollection_500::has_card(Card::number_t number, Card::suit_t suit) const
{
   Card_500 card = Card_500(number, suit);
   return has_card(&card);
}