LaraMo / Risk-Swift-Sloths

COMP 345 project taken in Fall 2023 - creating the RISK game with C++
Apache License 2.0
0 stars 2 forks source link

Cards #4

Closed LaraMo closed 1 year ago

LaraMo commented 1 year ago

Implement a group of C++ classes that implements a deck and hand of Warzone cards. Each card has a type from: bomb, reinforcement, blockade, airlift and diplomacy. The Deck class must have a draw() method that allows a player to draw a card at random from the cards remaining in the deck and place it in their hand of cards. The objects of type Card must have a play() method that is called to play the card, which creates an order and adds it to the player’s list of orders and then returns the card to the deck. All the classes/functions that you implement for this component must all reside in a single .cpp/.h file duo named Cards.cpp/Cards.h. You must deliver a file named CardsDriver.cpp file that contains a free function named testCards() that creates a deck of Warzone cards, then create a hand object that is filled by drawing cards from the deck.