Galactic Bloodshed
sector.cc
Go to the documentation of this file.
1 // Copyright 2014 The Galactic Bloodshed Authors. All rights reserved.
2 // Use of this source code is governed by a license that can be
3 // found in the COPYING file.
4 
5 #include <iostream>
6 
7 #include "gb/utils/rand.h"
8 #include "gb/vars.h"
9 
11  os << "Efficiency: " << s.eff << std::endl;
12  os << "Fertility: " << s.fert << std::endl;
13  os << "Mobilization: " << s.mobilization << std::endl;
14  os << "Crystals: " << s.crystals << std::endl;
15  os << "Resource: " << s.resource << std::endl;
16  os << "Population: " << s.popn << std::endl;
17  os << "Troops: " << s.troops << std::endl;
18  os << "Owner: " << s.owner << std::endl;
19  os << "Race: " << s.race << std::endl;
20  os << "Type: " << s.type << std::endl;
21  os << "Condition: " << s.condition << std::endl;
22  return os;
23 }
24 
25 Sector &SectorMap::get_random() {
26  return get(int_rand(0, maxx_ - 1), int_rand(0, maxy_ - 1));
27 }
std::ostream & operator<<(std::ostream &os, const Sector &s)
Definition: sector.cc:10