help for my code1

Hi, I've been suffering with my magic the gathering c++ code. Here's the problem;
I make combat between two cards and after the fight, opponent's HP will be reduce. So far, the HP reduces in side the classes but when we call the player's HP, it doesn't change as in the classes.
What I can add to change the value throughout the program?

help for my code

  1. Combat between two creature cards: Reduce the defending creatures HP by the attack power of the attacking creature card AND reduce the attacking creatures HP by the attack power of the defending creature card. If either the attacker or the defender or both of them is/are reduced to 0 HP or lower these creatures are destroyed.
    Special abilities:
    a. If the attacking creature has Trample ability, the excess amount of attack power is dealt to the opposing player (which can cause the opposing player dying). Here the excess amount of attack power is calculated as:
    Excess attack power = Attackers attack power defenders HP
    b. If the attacking creature has First Strike ability,
    i. If the defending creature also has First Strike ability, normal attack procedure.
    ii. If the defending creature does NOT have First Strike ability; then first the Attackers attack power is applied to the defenders HP. If the defender is destroyed then the combat stops here (i.e., the defender CANNOT deal its damage to the attacker)
    c. If the attacking creature does NOT have First Strike ability,
    i. If the defending creature has First Strike ability, then first the Defenders attack power is
    applied to the attackers HP. If the attacker is destroyed then the combat stops here (i.e., the
    attacker CANNOT deal its damage to the defender)
    ii. If the defending creature also does NOT have First Strike ability; normal attack procedure.
  2. Combat between one creature card and the opposing player: Reduce the HP of the opposing player by the attack power of the attacking creature card. If the opposing players HP is reduced to 0 or lower, that player loses the game.

magicthegathering

Can anyone help me to write combat class?

  1. Combat between two creature cards: Reduce the defending creatures HP by the attack power of the attacking creature card AND reduce the attacking creatures HP by the attack power of the defending creature card. If either the attacker or the defender or both of them is/are reduced to 0 HP or lower these creatures are destroyed.
    ------Special abilities:
    a. If the attacking creature has Trample ability, the excess amount of attack power is dealt to the opposing player (which can cause the opposing player dying). Here the excess amount of attack power is calculated as:
    Excess attack power = Attackers attack power defenders HP
    b. If the attacking creature has First Strike ability,
    i. If the defending creature also has First Strike ability, normal attack procedure.
    ii. If the defending creature does NOT have First Strike ability; then first the Attackers attack power is applied to the defenders HP. If the defender is destroyed then the combat stops here (i.e., the defender CANNOT deal its damage to the attacker)
    c. If the attacking creature does NOT have First Strike ability,
    i. If the defending creature has First Strike ability, then first the Defenders attack power is
    applied to the attackers HP. If the attacker is destroyed then the combat stops here (i.e., the
    attacker CANNOT deal its damage to the defender)
    ii. If the defending creature also does NOT have First Strike ability; normal attack procedure.
  2. Combat between one creature card and the opposing player: Reduce the HP of the opposing player by the attack power of the attacking creature card. If the opposing players HP is reduced to 0 or lower, that player loses the game.

magic the gathering

Hi guys! I am currently using c++ and I wanted to start doing basics of a game with oop. And I thought MGT would be good. So, the problem is idk where to start with. I'm planning to use only Land, Creature, Enchantment and, Sorcery cards. so is there any help to find how to start?
-you know hardest part is the beginning-

Can anyone help me to solve this code?

Write a program that checks the pressure of soda cans coming from a production line using a function. For each soda, the pressure value must be CLOSE to its ideal value. However, due to manufacturing problems the pressure value from can to can.

First, the program will read the number of cans (numCan) as an int. Then, the ideal pressure value will be given (idealPsi) as a double followed by lower tolerance level (lowerTLevel) as a double and upper tolerance level (upperTLevel) as a double. Lastly, one by one the pressure values for each can will be given as double values.

The program will check the pressure value of each can using a function (isPressureAcceptable) that gets necessary items as parameters and returns a bool value. The main function will print out the index of the defective items as int values. An item that is OUTSIDE the tolerance boundary is a defective item.

The tolerance boundary can be calculated with the following formulas;

Lower Boundary = idealPsi (idealPsi * lowerTlLevel)

Upper Boundary = idealPsi + (idealPsi * upperTlLevel)

NOTE: The pressure acceptability check MUST be done in the function and printing the result to the screen MUST be done in the main function.

NOTE: The index number of the first product is 1, NOT 0.

The inputs and outputs should be :

Input;
4 92 0.12 0.2
100 92 200 8

Output;
3 4

Input;
8 55.3 0.04 0.1
55 55.1 58 55.2 55.6 69.8 55 54.9

Output;
6

Input;
6 72 0.2 0
72 70 73 72.1 72 72.01

Output;
3 4 6