Apanian25 / Comp345-Risk

0 stars 0 forks source link

Cards deck/hand #6

Closed Apanian25 closed 3 years ago

Apanian25 commented 4 years ago

Tasks

Description

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 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 cards 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 creates a deck of Warzone cards. The driver must also create a hand object that is filled by drawing cards from the deck.

Apanian25 commented 3 years ago

Specific

https://github.com/Apanian25/Comp345-Risk/blob/4204a8d1a297bf38f22c333ad18151d5694f5b3d/Risk/Comp345-Risk/Cards.h#L15 you misspelled Card as Crad

https://github.com/Apanian25/Comp345-Risk/blob/4204a8d1a297bf38f22c333ad18151d5694f5b3d/Risk/Comp345-Risk/Cards.h#L16 you misspelled which as whihc

https://github.com/Apanian25/Comp345-Risk/blob/4204a8d1a297bf38f22c333ad18151d5694f5b3d/Risk/Comp345-Risk/Cards.cpp#L50 it's not a default constructor, it's a no param constructor

https://github.com/Apanian25/Comp345-Risk/blob/4204a8d1a297bf38f22c333ad18151d5694f5b3d/Risk/Comp345-Risk/Cards.cpp#L206 people usually use i for the outer loop, and j for the inner loop

General

https://github.com/Apanian25/Comp345-Risk/blob/4204a8d1a297bf38f22c333ad18151d5694f5b3d/Risk/Comp345-Risk/Cards.cpp#L61 https://github.com/Apanian25/Comp345-Risk/blob/4204a8d1a297bf38f22c333ad18151d5694f5b3d/Risk/Comp345-Risk/Cards.cpp#L71

https://github.com/Apanian25/Comp345-Risk/blob/4204a8d1a297bf38f22c333ad18151d5694f5b3d/Risk/Comp345-Risk/Cards.cpp#L290