BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

C++代写 | CptS 122 Assignment 5: Implement Yu Gi Oh! Card

C++代写 | CptS 122 Assignment 5: Implement Yu Gi Oh! Card

这个作业是用C++实现一个’Yu Gi Oh’卡牌游戏

CptS 122 – Data Structures
Programming Assignment 5: Implement Yu Gi Oh! Card
Game
Monster Cards: (Node Struct)
a. Name
b. Attack Points – # of points to take from life points
c. Defense Points – # of points to keep subsequent attack
d. Type – monster type gives extra points to the ATK or DEF points
Implementation:
1. Each player can start out with a set of cards (the deck):
a. Player adds card individually
b. Player gets a set of predefined cards
2. Players can go into battle
a. Player starts out with 8000 life points
b. Coin Toss to see who goes first player 1 or player 2
c. Each Player chooses 5 cards from the deck into their respective hands
i. Player can only choose from the top of the deck
d. Each player will place one card of their choosing in defense mode (queue)
e. Each player will place one card of their choosing in attack mode (queue)
f. Each player will choose to activate a card from one of the queues
i. If one player activates the attack card and the other activates a defense
card
1. New Life points = Life points – (ATK – DEF)
ii. If both players choose defense
1. Cards get discarded – not life points are taken
iii. If both players choose attack
1. One with greater ATK wins round
2. New Life points = Life points – (ATK – ATK)
g. After the first round
i. 5 cards should be in the players hand (array) at all times retrieved from the
deck (stack)
ii. Two more cards are placed in attack and defense mode (queues)
iii. Cards must be activated in queue mode
3. Battle ends when a player has no more Life Points
4. Players can trade cards:
Cards can be added and deleted from any players deck.
Example of output:
Choose an option from the following:
1. Create Players
2. Add Cards to Specific Player
3. Trade Cards with Other Player
4. Battle Other Player
Input: 4
Round 1:
Player 1 chooses Cyber Dragon in ATK
mode
Player 2 chooses Dark Magician in DEF
mode
Player 2 losses 0 life points
Player 1: 8000 LP
Player 2: 8000 LP
Round 2: ….
• Options 1 creation of a player should populate both players with a 30 card deck
• Option 2 if a certain player wants to add more specific cards to their 30 card deck
Note: option 1 in the menu needs to be run by the players before trading or battling commences
• You will have two classes: Stack class and Queue class.
• The main.cpp will implement the menu above.

bestdaixie