Skip to content

Commit

Permalink
Merge branch 'feature/Game-RandomGenerator-classes' of https://github…
Browse files Browse the repository at this point in the history
….com/HelanaNady/Alien-Invasion into feature/Game-RandomGenerator-classes
  • Loading branch information
AhmedSobhy01 committed Apr 4, 2024
2 parents 5f593d1 + e3a170e commit 2b0a3a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ArmyClasses/AlienArmy.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class AlienArmy: public Army
{
private:
LinkedQueue<AlienSoldier*> soliders;
LinkedQueue<AlienSoldier*> soldiers;
// Array <AlienMonster> monsters;
Deque<AlienDrone*> drones;

Expand Down
20 changes: 10 additions & 10 deletions Containers/PriorityNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ class PriorityNode
PriorityNode<T>* next; // Pointer to next node

public:
PriorityNode(const T& _item, int _priority);
PriorityNode(const T& item, int priority);

void setItem(const T& _item, int _priority);
void setItem(const T& item, int priority);
void setNext(PriorityNode<T>* nextNodePtr);

T getItem(int& _priority) const;
T getItem(int& priority) const;
PriorityNode<T>* getNext() const;
int getPriority() const;
};

template <typename T>
inline PriorityNode<T>::PriorityNode(const T& _item, int _priority)
inline PriorityNode<T>::PriorityNode(const T& item, int priority)
{
setItem(_item, _priority);
setItem(item, priority);
next = nullptr;
}

template <typename T>
inline void PriorityNode<T>::setItem(const T& _item, int _priority)
inline void PriorityNode<T>::setItem(const T& item, int priority)
{
item = _item;
priority = _priority;
this->item = item;
this->priority = priority;
}

template <typename T>
Expand All @@ -40,9 +40,9 @@ void PriorityNode<T>::setNext(PriorityNode<T>* nextNodePtr)
}

template <typename T>
inline T PriorityNode<T>::getItem(int& _priority) const
inline T PriorityNode<T>::getItem(int& priority) const
{
_priority = priority;
priority = this->priority;

return item;
}
Expand Down

0 comments on commit 2b0a3a9

Please sign in to comment.