home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / g / gina15.zip / demos / sleuth / Card.C < prev    next >
Text File  |  1992-02-27  |  697b  |  27 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2.  
  3. //   Module      : Card.C   Version 1.2
  4. //   LastSCCS    : 2/26/92  16:37:48
  5. //   LastEdit    : "Fri Nov  8 13:40:43 1991"
  6. //   Description : 
  7. //   Author      : 
  8. //   Copyright   : GMD Schloss Birlinghoven
  9.  
  10. Card::
  11. Card(int p_shape, int p_color, int p_value)
  12. : PlayerLocation(0, p_shape, p_color, p_value)
  13. {
  14.     REQUIRE(p_shape >= 0 && p_shape <= 2, "Shape is 0, 1, or 2");
  15.     REQUIRE(p_color >= 0 && p_color <= 3, "Color is 0, 1, 2, or 3");
  16.     REQUIRE(p_value >= 0 && p_value <= 2, "Value is 0, 1, or 2");
  17. }
  18.  
  19. void Card::
  20. SetPlayer(Player *p_player)
  21. {
  22.     player = p_player;
  23. }
  24.  
  25. ImplGenericListWithIterator(CardList,CardListIterator);
  26.  
  27.