Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created August 12, 2019 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BetterProgramming/eda1b708536a59c4e4176ea8a7a1f685 to your computer and use it in GitHub Desktop.
Save BetterProgramming/eda1b708536a59c4e4176ea8a7a1f685 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <vector>
#include "Soldier.hpp"
class SquadCommander
{
public:
void OrderRetreat()
{
for(int index = 0; index < _squad.size(); ++index)
{
_squad[index].Flee();
}
}
void OrdertAttack()
{
for(int index = 0; index < _squad.size(); ++index)
{
_squad[index].Shoot();
}
}
private:
std::vector<Soldier> _squad;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment