Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 3.145.196.150
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0705) :  /home/cewhitfield/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/cewhitfield/cardclass1.cpp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0046)http://facultystaff.vwc.edu/~kames/cardclass.h -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.3395" name=GENERATOR></HEAD>
<BODY><PRE>// cardclass.h - Header file for card and card deck classes

// Support types for the cards and card deck

const int DECKSIZE = 52;   // Number of cards in deck

enum SuitType {CLUB, DIAMOND, HEART, SPADE};              // Suit values
enum FaceType {TWO, THREE, FOUR, FIVE, SIX, SEVEN,        // Face values
	       EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE};

// The card class

class CardType
{
    public:
	CardType();
	void Assign(SuitType s, FaceType f);
	void Print();
	bool GreaterFace(CardType othercard);
	bool EqualFace(CardType othercard);
	bool GreaterSuit(CardType othercard);
	bool EqualSuit(CardType othercard);
    private:
	SuitType suit;
	FaceType face;
};

// The deck class

class DeckType
{   
    public:
	DeckType();
	void Print();
	void Shuffle();
	bool IsEmpty();
	CardType DrawCard();
    private:
	CardType cards[DECKSIZE];  // The cards
	int top;                   // The next card to be drawn (starts at 0)
};


</PRE></BODY></HTML>

Stv3n404 - 2023