/* This file is part of cardwords
   (c) 1998 1999 2000 Tobias Peters
   see file COPYING for the copyright terms.
   
   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 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
*/

//  cardwords_card.hh

#ifndef CARDWORDS_CARD_HH
#define CARDWORDS_CARD_HH

#include "cardwords_cardbase.hh"
namespace CardWords {
class Card : public CardBase {
public:
  virtual
  bool
  is_wildcard(void) const;
  
  // Get the char that is written on this card:
  virtual
  const Char &
  get_faceValue(void) const;

  // Get the score for this card:
  virtual
  int
  get_points(void) const;

  Card( Char face,
                  Char means,
                  int score);
  Card( char face,
                  char means,
                  int score);
  Card( char faceAndMeans,
                  int score);

  // read the card definition from a stream:
  Card( istream & );

  bool operator < (const Card &)const;
  bool operator == (const Card &)const;
  bool operator > (const Card &)const;

  int compare(const Card &)const;

  // The container where this card is currently stored:
  class CardContainer *
  get_container(void) const;

  void 
  set_container(class CardContainer *);

private:
  bool wildcard;
  int  points; // The score for this card.


  Char faceValue; // The char that is written on this card.

  // every card is contained in a cardcontainer:
  class CardContainer * container;

  // Every card gets a unique number. This way Two cards always have a
  // lesser/greater order. This is important as they will be referenced
  // by sets.
  long unsigned uniqueNumber;
  // This will be assigned and incremented at every constructor:
  static long unsigned nextUniqueNumber;
};
}
#endif

