Skip to content
Snippets Groups Projects
Commit de1bea63 authored by Max Cherris's avatar Max Cherris
Browse files

Add nested unordered_map for damageMatrix

parent 21ca6c12
Branches
No related tags found
1 merge request!15Merge units into main
...@@ -54,6 +54,9 @@ enum class MovementType { ...@@ -54,6 +54,9 @@ enum class MovementType {
LANDER = 5, LANDER = 5,
}; };
//Fill the MatchupTabel
using MatchupTabel = std::unordered_map<u_int8_t, std::unordered_map<u_int8_t, int>>;
class Unit { class Unit {
public: public:
Unit(int x, int y, UnitFaction faction, UnitId id, UnitState state); Unit(int x, int y, UnitFaction faction, UnitId id, UnitState state);
...@@ -68,7 +71,7 @@ public: ...@@ -68,7 +71,7 @@ public:
Will Update the health for both units Will Update the health for both units
Attacker deals damage to the defender first Attacker deals damage to the defender first
*/ */
void init_combat(Unit &defender); void attack(Unit &enemy);
/* /*
...@@ -83,6 +86,8 @@ public: ...@@ -83,6 +86,8 @@ public:
*/ */
void calculate_movement(); void calculate_movement();
private: private:
int x; int x;
int y; int y;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment