summaryrefslogtreecommitdiff
path: root/battles/src/Scenario.cpp
blob: 49a9c7c6dd8f7a0c2a6de3cdfdcf9c8a5d124109 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <kurator/battles/Scenario.h>


namespace kurator
{
namespace battles
{


int
Scenario::total_teams() const
{
	int last_team = 0;
	for (const auto& ship : ships) {
		if (ship.team > last_team)
			last_team = ship.team;
	}
	return last_team + 1;
}


}  // namespace battles
}  // namespace kurator