C++ coding for a program

進行中 投稿 Feb 26, 2016 着払い
進行中

The following has been done already, please see attached files...What I need help with is half way down.

Create a simple class hierarchy as the basis for a fantasy combat game. The ‘universe’ contains Goblins, Barbarians, Reptile People, Blue Men and others. Each will have characteristics for attack, defense, armor, and strength points.

3d6 is rolling three 6-sided dice. 2d10 is rolling two 10-sided dice.

examples

Vampire: Attack = 1d12, Defense = 1d6*Charm, Armor =1, Strength points = 18

Blue Men: Attack = 2d10, Defense = 3d10, Armor = 3, Strength points = 12 *Mob

To resolve an attack generate 2 dice rolls. The attacker rolls the appropriate number and type of dice under Attack. The defender rolls the appropriate number and type of dice under Defense. Subtract the Defense roll from the Attack roll. That is the damage. Each class only has its own information or data. When O1 is fighting O2 your program should call O1’s attack function. It will return the damage inflicted. Then O2’s defense function will take the damage inflicted, then roll the specified dice and subtract the points for the defense. To apply the damage you subtract the Armor value. The result is then subtracted from the Strength Points. That value becomes the new Strength Points for the next round. If Strength Points goes to 0 or less then the character is out of the combat. If it receives 8 points of damage and rolls3 for it’s defense and has an armor of 3 it would take 8 subtract 3 and then 3 for the armor to receive 2 points of damage.

Create a Creature class. Then you will have a subclass for each of these characters. Note that the Creature class will be an abstract class. You will never instantiate one. For our purposes right now each subclass will vary only in the values in the table. Since each starts with the same data elements you will only need one constructor. It is part of your design task to determine what functions you will need. The only value that can change is the Strength Points.

...All the above has been done. Below is what I need help with...

The program will run a tournament. A user will enter the number of fighters both players will use. The first player supplies a lineup of creatures (the 5 characters) in order. The second player then supplies their lineup of creatures in order. After each round (battle between 2 player) display which type of creatures fought and which won. At the end of the tournament the program will display: the first, second, and third place finishers, their teams, as well as which side scored more points. Provide an option for the use to see a list of the final order of all fighters.

The user should enter the type of creature and name. Each object should be instantiated and put into their lineup. Use pointers to creatures in the program. A creature pointer can then be used to indicate an object of a subclass and polymorphism will ensure the correct function is called.

By lineup is like a batting order in baseball. The head of each lineup fights. The winner gets put at the back of his team’s lineup; the other goes to the container for those who lost. The lineup order cannot be changed once the players are entered. Similarly, the loser pile should have the last loser at the top and the first loser at the bottom. (FIFO and FILO files)

When a creature wins 50% of their damage taken gets restored and they go to the end of their team’s lineup. Each round is worth a point and the team with the most points wins the tournament. A team will fight until all its players have been eliminated.

C++プログラミング PHP ソフトウェアアーキテクチャ

プロジェクトID: #9775906

プロジェクトについて

4個の提案 リモートプロジェクト アクティブ Feb 26, 2016

アワード:

sahanwa23

Hi! Im an electrical and electronic masters student studying in UWE. I have the experience of coding in C/C++/Assembly/Arduino/PIC C/MikroC/MATLAB for more than three years. I also have the knowledge and experience o もっと

$15 USD / 時間
(8レビュー)
3.5

4 人のフリーランサーが、平均$25/時間で、この仕事に入札しています。

hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under linux environ もっと

$15 USD / 時間
(91件のレビュー)
6.8
finecodervw

Hi, Please let me know which C++ compiler you are using. I am well versed with C++ and various concepts like classes, methods, constructors, arrays, console applications , string handling, file manipulations, li もっと

$30 USD / 時間
(144件のレビュー)
6.1