0
C++ how to start this
I have an assignment for uni We have to make a game similar to hearthstone where there are 2 players Sorceress and Wizard Their respective cards have to be read from a .txt file into an array/class and play 30 rounds or until someone is dead I know I need to include fstream but apart from that Iâm lost can anyone help?
9 Answers
+ 5
Well you got you work cut out for you.
Any graphics?
here are some example codes on managing files
https://code.sololearn.com/cvQWi7fYaz0I/?ref=app
https://code.sololearn.com/cZuN8As374w2/?ref=app
https://code.sololearn.com/cjZfN8zIvkrt/?ref=app
+ 4
Using visual studio 2017 as your ide?
+ 4
I reccommend that you make a prototype with no content and only using the most essential code.
If to like the prototype just keep building on it.
I do not play heartstons so you neet to find to most basic parts.
Then create codes to make it.
+ 4
Can you link .h and .cpp files, so far?
+ 1
No graphics itâs a windows console app
0
Thanks though
0
Yes
0
I honestly havenât started because I have no idea with this one.
I can upload the brief?
0
⢠You may implement a simplified version of the assignment to obtain a bare pass mark of 40%. If you follow this route then you cannot gain more than a pass mark of 40%.
⢠There are two players: âSorceressâ andâ Wizardâ.
⢠The game is played in rounds.
⢠The game has a maximum of 30 rounds. In each round each player takes a turn. âSorceressâ begins each round of the game.
⢠The players have health. Each player begins the game with 30 health points. When a player is attacked they lose health. When the health of a player reaches 0 they lose the game.
⢠Each player has a deck of cards. The deck of cards is read from file at the beginning of the game. Each player has their own deck: "sorceress.txt" and "wizard.txt". You may implement the decks as global variables.
⢠Go through deck in order, each player playing the next card in the deck. (Note that this will mean that the cards will always come out in the same sequence.)
⢠Cards attack the enemy player.
⢠The game ends at the end of the round when a player has 0 or less health.
⢠Use an array to store the cards. You do not need to use pointers or dynamic memory allocation.
⢠Comment your code but no need to comment each function.
⢠Only use card type 1.