/**********************************************************************
 *
 *   FreeDoko a Doppelkopf-Game
 *    
 *   Copyright (C) 2001-2009  by Diether Knof and Borg Enders
 *
 *   This program is free software; you can redistribute it and/or 
 *   modify it under the terms of the GNU General Public License as 
 *   published by the Free Software Foundation; either version 2 of 
 *   the License, or (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details. 
 *   You can find this license in the file 'gpl.txt'.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
 *   MA  02111-1307  USA
 *
 *  Contact:
 *    Diether Knof dknof@gmx.de
 *    Borg Enders  borg@borgsoft.de
 *
 *********************************************************************/

#ifndef CLASS_CARDS_INFORMATION_OF_PLAYER_WEIGHTING_HEURISTICS_HEADER
#define CLASS_CARDS_INFORMATION_OF_PLAYER_WEIGHTING_HEURISTICS_HEADER

#include "../../basistypes.h"
#include "../../card/card.h"

class HandCard;
class Trick;
class Player;
class Ai;

/**
 ** heuristics for the team information
 **
 ** @author	Diether Knof
 **
 ** @todo       handle the case, when more then one heuristics matches
 **/
namespace CardsInformationOfPlayerWeightingHeuristics {
  // the player has accepted a poverty and returned cards
  void poverty_returned(Player const& player,
			Ai const& ai,
			map<Card, int>& weightings,
			unsigned const trumpno);

#define HEURISTIC(name) \
  void name(HandCard const& played_card, \
	    Trick const& trick, \
	    Ai const& ai, \
	    map<Card, int>& weightings)

  // not started with a color ace
  HEURISTIC(no_color_ace);
  // a color trick has been served
  HEURISTIC(served_color);
  // a color trick has been jabbed (first run)
  HEURISTIC(color_trick_jabbed_first_run);

  // the last player in a trump trick (player has jabbed)
  HEURISTIC(last_player_jabbed_trump);
  // the last player in a trump trick (player has not jabbed)
  HEURISTIC(last_player_not_jabbed_trump);
  // the player has served a trump trick
  HEURISTIC(served_trump);

  // the player has thrown a trump in a color trick
  HEURISTIC(threw_trump_in_color_trick);

  // the first player has played a pfund
  HEURISTIC(first_player_played_pfund);

  // the player has no second diamond ace because he has not announced swines
  HEURISTIC(no_swines);
  // assumption: no silent marriage
  HEURISTIC(no_silent_marriage);

  // the player will start with a dolle, if he has the second one
  HEURISTIC(both_dollen);

  // the re player in a poverty starts with a trump
  HEURISTIC(poverty_re_starts_with_trump);

  // the soloplayer will probably start with a ten when he has both aces
  HEURISTIC(meatless_startcard);

  // the re player has played the second best trump in a picture solo
  HEURISTIC(picture_solo_re_played_second_best_trump);
  // a contra player has played a trump in a picture solo
  HEURISTIC(picture_solo_contra_played_trump);

#undef HEURISTIC

} // namespace CardsInformationOfPlayerWeightingHeuristics

#endif // #ifndef CLASS_CARDS_INFORMATION_OF_PLAYER_WEIGHTING_HEURISTICS_HEADER
