/**********************************************************************
 *
 *   FreeDoko a Doppelkopf-Game
 *    
 *   Copyright (C) 2001-2004  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
 *
 *********************************************************************/

#include "constants.h"

#ifdef USE_UI_GTK

#include "trickpiles.h"
#include "gtk_gui.h"
#include "card.h"
#include "table.h"

#include "../../utils/string.h"
#include "../../party/party.h"
#include "../../party/rule.h"
#include "../../game/game.h"
#include "../../player/player.h"
#include "../../misc/setting.h"

namespace GTK_DOKO {

#define TRICKPILE_TRICKS_STEP_BIG_PART (1 / 15.0)
#define TRICKPILE_TRICKS_STEP_SMALL_PART (1 / 30.0)
#define TRICKPILE_CARDS_STEP_BIG_PART (0)
#define TRICKPILE_CARDS_STEP_SMALL_PART (1 / 20.0)

  /**
   *
   * constructor
   *
   * @param	trickpiles	the trickpiles, this trickpile belongs to
   * @param	player		the player, this trickpile belongs to
   *
   * @return	-
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  TrickPile::TrickPile(TrickPiles* trickpiles,
		       Player const& player) :
    HTINBase(trickpiles, player)
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_INIT,
		    "TrickPile::TrickPile(playerno)");

      DEBUG_RETURNING(VOID,
		      INFO_GTK_TRICKPILE && INFO_GTK_INIT,
		      "TrickPile::TrickPile(playerno)");
    } // TrickPile::TrickPile(TrickPiles* trickpiles, Player const& player)

  /**
   *
   * destructor
   *
   * @param	-
   *
   * @return	-
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  TrickPile::~TrickPile()
  {
    DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_INIT,
		  "TrickPile::~TrickPile()");

    DEBUG_RETURNING(VOID,
		    INFO_GTK_TRICKPILE && INFO_GTK_INIT,
		    "TrickPile::~TrickPile()");
  } // TrickPile::~TrickPile()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	the trickpiles, this trickpile belongs to
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  TrickPiles&
    TrickPile::trickpiles() 
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::trickpiles()");

      DEBUG_RETURNING(static_cast<TrickPiles&>(this->group()),
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::trickpiles()");
    } // TrickPiles& TrickPile::trickpiles()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	starting x position of the trickpile
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  int
    TrickPile::start_x()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::start_x()");

      int value = 0; // return value

      switch(this->player().no()) {
      case 0:
	value = (this->hand().start_x() + this->hand().width()
		 + HAND_MARGIN_BOTTOM);
	break;
      case 1:
	value = this->hand().start_x();
	break;
      case 2:
	value = (this->hand().start_x()
		 - this->gui().cards().height()
		 - HAND_MARGIN_TOP);
	break;
      case 3:
	value = (this->hand().start_x() + this->hand().width()
		 - this->gui().cards().width());
	break;
      default:
	DEBUG_ASSERTION(false,
			"TrickPile::start_x():\n"
			"  `this->player().no()` not valid (not 0, 1, 2, 3)");
      } // switch(this->player().no())

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::start_x()");
    } // int TrickPile::start_x()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	starting y position of the trickpile
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  int
    TrickPile::start_y()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::start_y()");

      int value = 0; // return value

      switch(this->player().no()) {
      case 0:
	value = (this->hand().start_y() + this->hand().height()
		 - this->gui().cards().width());
	break;
      case 1:
	value = (this->hand().start_y() + this->hand().height()
		 + HAND_MARGIN_LEFT);
	break;
      case 2:
	value = this->hand().start_y();
	break;
      case 3:
	value = (this->hand().start_y()
		 - this->gui().cards().height()
		 - HAND_MARGIN_RIGHT);
	break;
      default:
	DEBUG_ASSERTION(false,
			"TrickPile::start_y():\n"
			"  `this->player().no()` not valid (not 0, 1, 2, 3)");
      } // switch(this->player().no())

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::start_y()");
    } // int TrickPile::start_y()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	step of the tricks in the trickpile
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  int
    TrickPile::tricks_step_x()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::step_x()");

      int value; // return value

      switch(this->player().no()) {
      case 0:
	value = int(this->gui().cards().height()
		    * TRICKPILE_TRICKS_STEP_BIG_PART);
	break;
      case 2:
	value = -int(this->gui().cards().height()
		     * TRICKPILE_TRICKS_STEP_BIG_PART);
	break;
      case 1:
	value = int(this->gui().cards().height()
		    * TRICKPILE_TRICKS_STEP_SMALL_PART);
	break;
      case 3:
	value = -int(this->gui().cards().height()
		     * TRICKPILE_TRICKS_STEP_SMALL_PART);
	break;
      default:
	DEBUG_ASSERTION(false,
			"TrickPile::tricks_step_y():\n"
			"  `this->player().no()` not valid (not 0, 1, 2, 3)");
      } // switch(this->player().no())

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::tricks_step_x()");
    } // int TrickPile::tricks_step_x()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	step of the tricks in the trickpile
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  int
    TrickPile::tricks_step_y()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::tricks_step_y()");

      int value; // return value

      switch(this->player().no()) {
      case 0:
	value = -int(this->gui().cards().height()
		     * TRICKPILE_TRICKS_STEP_SMALL_PART);
	break;
      case 2:
	value = int(this->gui().cards().height()
		    * TRICKPILE_TRICKS_STEP_SMALL_PART);
	break;
      case 1:
	value = int(this->gui().cards().height()
		    * TRICKPILE_TRICKS_STEP_BIG_PART);
	break;
      case 3:
	value = -int(this->gui().cards().height()
		     * TRICKPILE_TRICKS_STEP_BIG_PART);
	break;
      default:
	DEBUG_ASSERTION(false,
			"TrickPile::tricks_step_y():\n"
			"  `this->player().no()` not valid (not 0, 1, 2, 3)");
      } // switch(this->player().no())

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::tricks_step_y()");
    } // int TrickPile::tricks_step_y()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	Step of the cards in the trick
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  int
    TrickPile::cards_step_x()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::step_x()");

      int value; // return value

      switch(this->player().no()) {
      case 0:
	value = int(this->gui().cards().height()
		    * TRICKPILE_CARDS_STEP_BIG_PART);
	break;
      case 2:
	value = -int(this->gui().cards().height()
		     * TRICKPILE_CARDS_STEP_BIG_PART);
	break;
      case 1:
	value = int(this->gui().cards().width()
		    * TRICKPILE_CARDS_STEP_SMALL_PART);
	break;
      case 3:
	value = -int(this->gui().cards().width()
		     * TRICKPILE_CARDS_STEP_SMALL_PART);
	break;
      default:
	DEBUG_ASSERTION(false,
			"TrickPile::cards_step_y():\n"
			"  `this->player().no()` not valid (not 0, 1, 2, 3)");
      } // switch(this->player().no())

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::cards_step_x()");
    } // int TrickPile::cards_step_x()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	step of the cards in the trick
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  int
    TrickPile::cards_step_y()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::cards_step_y()");

      int value; // return value

      switch(this->player().no()) {
      case 0:
	value = -int(this->gui().cards().width()
		     * TRICKPILE_CARDS_STEP_SMALL_PART);
	break;
      case 2:
	value = int(this->gui().cards().width()
		    * TRICKPILE_CARDS_STEP_SMALL_PART);
	break;
      case 1:
	value = int(this->gui().cards().height()
		    * TRICKPILE_CARDS_STEP_BIG_PART);
	break;
      case 3:
	value = -int(this->gui().cards().height()
		     * TRICKPILE_CARDS_STEP_BIG_PART);
	break;
      default:
	DEBUG_ASSERTION(false,
			"TrickPile::cards_step_y():\n"
			"  `this->player().no()` not valid (not 0, 1, 2, 3)");
      } // switch(this->player().no())

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::cards_step_y()");
    } // int TrickPile::cards_step_y()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	starting x position of the trickpile
   * 
   * @version	0.4.4 - *** unfinished
   *
   * @author	Diether Knof
   *
   */
  int
    TrickPile::border_left()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::border_left()");

      int value = 0; // return value

      switch(this->player().no()) {
      case 0:
	value = (this->hand().start_x() + this->hand().width()
		 + HAND_MARGIN_BOTTOM);
	break;
      case 1:
	value = this->hand().start_x();
	break;
      case 2:
	value = (this->hand().start_x() - this->width()
		 - HAND_MARGIN_TOP);
	break;
      case 3:
	value = this->hand().start_x() + this->hand().width() - this->width();
	break;
      default:
	DEBUG_ASSERTION(false,
			"TrickPile::border_left():\n"
			"  `this->player().no()` not valid (not 0, 1, 2, 3)");
      } // switch(this->player().no())

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::border_left()");
    } // int TrickPile::border_left()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	starting y position of the trickpile
   * 
   * @version	0.4.4 - *** unfinished
   *
   * @author	Diether Knof
   *
   */
  int
    TrickPile::border_up()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::border_up()");

      int value = 0; // return value

      switch(this->player().no()) {
      case 0:
	value = this->hand().start_y() + this->hand().height() - this->height();
	break;
      case 1:
	value = (this->hand().start_y() + this->hand().height()
		 + HAND_MARGIN_LEFT);
	break;
      case 2:
	value = this->hand().start_y();
	break;
      case 3:
	value = (this->hand().start_y() - this->height()
		 - HAND_MARGIN_RIGHT);
	break;
      default:
	DEBUG_ASSERTION(false,
			"TrickPile::border_up():\n"
			"  `this->player().no()` not valid (not 0, 1, 2, 3)");
      } // switch(this->player().no())

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::border_up()");
    } // int TrickPile::border_up()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	width of the trickpile
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  unsigned
    TrickPile::width()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::width()");

      unsigned value = 0; // return value

      if (::game_status & GAMESTATUS::GAME) {
	switch(this->player().no()) {
	case 0:
	case 2:
	  value = unsigned(this->gui().cards().height()
			   + (::party.game().numberoftricks_of_player(this->player())
			      * abs(this->tricks_step_x()))
			   + (::party.game().playerno()
			      * abs(this->cards_step_x())));
	  break;
	case 1:
	case 3:
	  value = unsigned(this->gui().cards().width()
			   + (::party.game().numberoftricks_of_player(this->player())
			      * abs(this->tricks_step_x()))
			   + (::party.game().playerno()
			      * abs(this->cards_step_x())));
	  break;
	default:
	  DEBUG_ASSERTION(false,
			  "TrickPile::width():\n"
			  "  `playerno()` not valid (not 0, 1, 2, 3)");
	} // switch(playerno())
      } // if (::game_status & GAMESTATUS::GAME)

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::width()");
    } // unsigned TrickPile::width()

  /**
   *
   * -> result
   *
   * @param	-
   *
   * @return	height of the trickpile
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  unsigned
    TrickPile::height()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		    "TrickPile::height()");

      unsigned value = 0; // return value

      if (::game_status & GAMESTATUS::GAME) {
	switch(this->player().no()) {
	case 0:
	case 2:
	  value = unsigned(this->gui().cards().width()
			   + (::party.game().numberoftricks_of_player(this->player())
			      * abs(this->tricks_step_y()))
			   + (::party.game().playerno()
			      * abs(this->cards_step_y())));
	  break;
	case 1:
	case 3:
	  value = unsigned(this->gui().cards().height()
			   + (::party.game().numberoftricks_of_player(this->player())
			      * abs(this->tricks_step_y()))
			   + (::party.game().playerno()
			      * abs(this->cards_step_y())));
	  break;
	default:
	  DEBUG_ASSERTION(false,
			  "TrickPile::height():\n"
			  "  `this->player().no()` not valid (not 0, 1, 2, 3)");
	} // switch(this->player().no())
      } // if (::game_status & GAMESTATUS::GAME)

      DEBUG_RETURNING(value,
		      INFO_GTK_TRICKPILE && INFO_GTK_VALUE,
		      "TrickPile::height()");
    } // unsigned TrickPile::height()

  /**
   *
   * draw the trickpile
   *
   * @param	update	whether the trickpile should be updated
   *			(default: true)
   *
   * @return	-
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  void
    TrickPile::draw(bool const update)
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_DRAW,
		    "TrickPile::draw(update)");

      this->draw_tricks();
      this->draw_points();

      // update the DrawingArea
      if (update) {
	trickpiles().table().update(border_left(),
				    border_up(),
				    width() + 1,
				    height() + 1);
	// ***DK to be removed
	trickpiles().table().update();
      }

      DEBUG_RETURNING(VOID,
		      INFO_GTK_TRICKPILE && INFO_GTK_DRAW,
		      "TrickPile::draw(update)");
    } // int TrickPile::draw(update)

  /**
   *
   * draw the tricks
   *
   * @param	-
   *
   * @return	-
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  void
    TrickPile::draw_tricks()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_DRAW,
		    "TrickPile::draw_tricks()");

      if (::game_status & GAMESTATUS::GAME) {
	Pixmap pixmap;
	switch(this->player().no()) {
	case 0:
	case 2:
	  pixmap = gui().cards().back(const_cast<Game const&>(::party.game()).player_following(this->player()));
	  break;
	case 1:
	case 3:
	  pixmap = gui().cards().back(const_cast<Game const&>(::party.game()).player_following(this->player()));
	  break;
	default:
	  DEBUG_ASSERTION(false,
			  "TrickPile::draw_tricks():\n"
			  "  `this->player().no()` not valid (not 0, 1, 2, 3)");
	} // switch(this->player().no())

	for (unsigned i = 0;
	     i < ((::game_status != GAMESTATUS::GAME_FINISHED)
		  ? ::party.game().numberoftricks_of_player(this->player())
		  : ::party.game().numberoftricks_of_player(this->player(),
							    this->trickpiles().table().last_trick().trickno())
		 );
	     i++) {
	  for (unsigned j = 0; j < ::party.game().playerno(); j++) {
	    pixmap.draw(this->trickpiles().table().pixmap(), 
			this->start_x()
			+ ((::party.rule()(Rule::SHOW_TRICKS_IN_TRICKPILES)
			    || (game_status == GAMESTATUS::GAME_FINISHED))
			   ? i * this->tricks_step_x()
			   : 0)
			+ j * this->cards_step_x(),
			this->start_y()
			+ ((::party.rule()(Rule::SHOW_TRICKS_IN_TRICKPILES)
			    || (game_status == GAMESTATUS::GAME_FINISHED))
			   ? i * this->tricks_step_y()
			   : 0 )
			+ j * this->cards_step_y()
		       );
	  } // for (j < playerno)
	} // for (i < numberoftricks)
      } // if (::game_status & GAMESTATUS::GAME)

      DEBUG_RETURNING(VOID,
		      INFO_GTK_TRICKPILE && INFO_GTK_DRAW,
		      "TrickPile::draw_tricks()");
    } // int TrickPile::draw_tricks()

  /**
   *
   * draws the points
   *
   * @param	-
   *
   * @return	-
   * 
   * @version	0.4.4
   *
   * @author	Diether Knof
   *
   */
  void
    TrickPile::draw_points()
    {
      DEBUG_CALLING(INFO_GTK_TRICKPILE && INFO_GTK_DRAW,
		    "TrickPile::draw_points()");

      if (::game_status & GAMESTATUS::GAME) {
	if (::party.game().rule()(Rule::SHOW_TRICKPILES_POINTS)
	    &&  ::setting(Setting::SHOW_TRICKPILES_POINTS)) {
	  if ((::game_status != GAMESTATUS::GAME_FINISHED)
	      ? ::party.game().numberoftricks_of_player(this->player())
	      : ::party.game().numberoftricks_of_player(this->player(),
							this->trickpiles().table().last_trick().trickno())
	      > 0) {

	    // the string with the points
	    string const points
	      = DK::Utils::String::to_string((::game_status != GAMESTATUS::GAME_FINISHED)
					     ? ::party.game().points_of_player(this->player())
					     : ::party.game().points_of_player(this->player(),
									       this->trickpiles().table().last_trick().trickno())
					    );

	    // the size of the text in the font
	    int lbearing, rbearing, width, ascent, descent;
	    gdk_text_extents(this->trickpiles().font(),
			     points.c_str(), points.length(),
			     &lbearing, &rbearing, &width, &ascent, &descent);

	    if ( (::game_status != GAMESTATUS::GAME_FINISHED)
		 || (this->trickpiles().table().last_trick().trickno() == UINT_MAX)
	       ) {
	      gdk_draw_text(this->trickpiles().table().pixmap(),
			    this->trickpiles().font(), trickpiles().gc(),
			    int(this->start_x()
				+ ((::party.rule()(Rule::SHOW_TRICKS_IN_TRICKPILES)
				    || (::game_status == GAMESTATUS::GAME_FINISHED))
				   ? (((::party.game().numberoftricks_of_player(this->player())
					- 1)
				       * this->tricks_step_x())
				     )
				   : 0 )
				+ ((::party.game().playerno() - 1)
				   * this->cards_step_x())
				+ ((((this->player().no() == 0)
				     || (this->player().no() == 2))
				    ? this->gui().cards().height()
				    : this->gui().cards().width())
				   / 2)
				- width / 2 - lbearing),
			    int(start_y()
				+ ((::party.rule()(Rule::SHOW_TRICKS_IN_TRICKPILES)
				    || (::game_status == GAMESTATUS::GAME_FINISHED))
				   ? (((::party.game().numberoftricks_of_player(this->player())
					- 1)
				       * this->tricks_step_y())
				     )
				   : 0 )
				+ ((::party.game().playerno() - 1)
				   * this->cards_step_y())
				+ ((((this->player().no() == 0)
				     || (this->player().no() == 2))
				    ? this->gui().cards().width()
				    : this->gui().cards().height())
				   / 2)
				+ ascent / 2),
			    points.c_str(),
			    points.length());
	    } else { // if !(game_status != GAME_FINISHED)
	      gdk_draw_text(this->trickpiles().table().pixmap(),
			    this->trickpiles().font(), trickpiles().gc(),
			    int(this->start_x()
				+ ((::party.game().numberoftricks_of_player(this->player(),
									    this->trickpiles().table().last_trick().trickno())
				    - 1)
				   * this->tricks_step_x())

				+ ((::party.game().playerno() - 1)
				   * this->cards_step_x())
				+ ((((this->player().no() == 0)
				     || (this->player().no() == 2))
				    ? this->gui().cards().height()
				    : this->gui().cards().width())
				   / 2)
				- width / 2 - lbearing),
			    int(start_y()
				+ ((::party.game().numberoftricks_of_player(this->player(),
									    this->trickpiles().table().last_trick().trickno())
				    - 1)
				   * this->tricks_step_y())
				+ ((::party.game().playerno() - 1)
				   * this->cards_step_y())
				+ ((((this->player().no() == 0)
				     || (this->player().no() == 2))
				    ? this->gui().cards().width()
				    : this->gui().cards().height())
				   / 2)
				+ ascent / 2),
			    points.c_str(),
			    points.length());
	    } // if !(game_status != GAME_FINISHED)

	  } // if (numberoftricks > 0)
	} // if (SHOW_TRICKPILES_POINTS)
      } // if (game_status & GAMESTATUS::GAME)

      DEBUG_RETURNING(VOID,
		      INFO_GTK_TRICKPILE && INFO_GTK_DRAW,
		      "TrickPile::draw_points()");
    } // int TrickPile::draw_points()

} // namespacee GTK_DOKO
#endif // #ifdef USE_UI_GTK
