@@ -116,14 +116,14 @@ AGG::AGG(int numPlayers, std::vector<int> &_actions, int numANodes, int _numPNod
116116
117117namespace {
118118
119- void stripComment (istream &in)
119+ void stripDescription (istream &in)
120120{
121121 in >> ws;
122122 const char c = in.peek ();
123123 stringbuf discard (ios_base::out);
124124 if (c == AGG::COMMENT_CHAR) {
125125 in.get (discard);
126- stripComment (in);
126+ stripDescription (in);
127127 }
128128}
129129
@@ -137,22 +137,22 @@ std::shared_ptr<AGG> AGG::makeAGG(istream &in)
137137 if (!in.good () || in.eof ()) {
138138 throw std::runtime_error (" Bad game file" );
139139 }
140- stripComment (in);
140+ stripDescription (in);
141141 in >> n;
142142 if (!in.good ()) {
143143 throw std::runtime_error (" Error reading the number of players" );
144144 }
145- stripComment (in);
145+ stripDescription (in);
146146 in >> S;
147147 if (!in.good ()) {
148148 throw std::runtime_error (" Error reading the number of action nodes" );
149149 }
150- stripComment (in);
150+ stripDescription (in);
151151 in >> P;
152152 if (!in.good ()) {
153153 throw std::runtime_error (" Error reading the number of function nodes" );
154154 }
155- stripComment (in);
155+ stripDescription (in);
156156
157157 // enter sizes of action sets:
158158 std::vector<int > size (n);
@@ -165,10 +165,10 @@ std::shared_ptr<AGG> AGG::makeAGG(istream &in)
165165 }
166166 }
167167
168- stripComment (in);
168+ stripDescription (in);
169169 vector<vector<int >> ASets (n); // action sets
170170 for (i = 0 ; i < n; i++) {
171- stripComment (in);
171+ stripDescription (in);
172172 for (j = 0 ; j < size[i]; j++) {
173173 int aindex;
174174 in >> aindex;
@@ -181,10 +181,10 @@ std::shared_ptr<AGG> AGG::makeAGG(istream &in)
181181 }
182182 }
183183
184- stripComment (in);
184+ stripDescription (in);
185185 vector<vector<int >> neighb (S + P); // neighbor lists
186186 for (i = 0 ; i < S + P; i++) {
187- stripComment (in);
187+ stripDescription (in);
188188 in >> neighb_size;
189189 if (in.eof () || in.fail ()) {
190190 throw std::runtime_error (
@@ -202,12 +202,12 @@ std::shared_ptr<AGG> AGG::makeAGG(istream &in)
202202 }
203203 }
204204
205- stripComment (in);
205+ stripDescription (in);
206206 // enter the projection types:
207207 vector<projtype> projTypes (P);
208208 for (i = 0 ; i < P; ++i) {
209209 int pt;
210- stripComment (in);
210+ stripDescription (in);
211211 in >> pt;
212212 if (in.eof () || in.fail ()) {
213213 throw std::runtime_error (" Error in game file: expected integer for type of function node #" +
@@ -259,13 +259,13 @@ std::shared_ptr<AGG> AGG::makeAGG(istream &in)
259259 }
260260 }
261261
262- stripComment (in);
262+ stripDescription (in);
263263 // read in payoffs
264264 for (i = 0 ; i < S; i++) {
265265 if (in.eof () || in.bad ()) {
266266 throw std::runtime_error (" Error in game file: not enough payoffs" );
267267 }
268- stripComment (in);
268+ stripDescription (in);
269269 int t;
270270 in >> t;
271271 if (!in.good ()) {
@@ -807,7 +807,7 @@ void AGG::makeMAPPINGpayoff(std::istream &in, aggpayoff &pay, int numNei)
807807 temp = pay;
808808 pay.clear ();
809809
810- stripComment (in);
810+ stripDescription (in);
811811 in >> num;
812812 if (!in.good ()) {
813813 throw std::runtime_error (" Error reading the integer number of configuration-value pairs" );
0 commit comments