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?

21st Mar 2018, 2:43 PM
Matthew Gibson-storey
Matthew Gibson-storey - avatar
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
21st Mar 2018, 4:28 PM
Manual
Manual - avatar
+ 4
Using visual studio 2017 as your ide?
21st Mar 2018, 4:33 PM
Manual
Manual - avatar
+ 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.
21st Mar 2018, 4:59 PM
Manual
Manual - avatar
+ 4
Can you link .h and .cpp files, so far?
21st Mar 2018, 5:00 PM
Manual
Manual - avatar
+ 1
No graphics it’s a windows console app
21st Mar 2018, 4:29 PM
Matthew Gibson-storey
Matthew Gibson-storey - avatar
0
Thanks though
21st Mar 2018, 4:29 PM
Matthew Gibson-storey
Matthew Gibson-storey - avatar
0
Yes
21st Mar 2018, 4:37 PM
Matthew Gibson-storey
Matthew Gibson-storey - avatar
0
I honestly haven’t started because I have no idea with this one. I can upload the brief?
21st Mar 2018, 5:57 PM
Matthew Gibson-storey
Matthew Gibson-storey - avatar
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.
21st Mar 2018, 6:00 PM
Matthew Gibson-storey
Matthew Gibson-storey - avatar