|
@@ -296,15 +296,13 @@ bool GameOfLife::load(std::string file) {
|
296
|
296
|
std::ifstream data(file.c_str());
|
297
|
297
|
if(!data)
|
298
|
298
|
return false;
|
299
|
|
-
|
|
299
|
+ cleanup();
|
300
|
300
|
std::string tmp;
|
301
|
301
|
data >> x;
|
302
|
302
|
data >> y;
|
303
|
303
|
data >> torus;
|
304
|
304
|
if(x<=0 || y <=0)
|
305
|
305
|
return false;
|
306
|
|
-
|
307
|
|
- cleanup();
|
308
|
306
|
allocate();
|
309
|
307
|
int j=0;
|
310
|
308
|
getline(data, tmp); // Remove \n
|
|
@@ -314,7 +312,6 @@ bool GameOfLife::load(std::string file) {
|
314
|
312
|
}
|
315
|
313
|
j++;
|
316
|
314
|
}
|
317
|
|
-
|
318
|
315
|
return true;
|
319
|
316
|
}
|
320
|
317
|
|
|
@@ -521,7 +518,6 @@ float GameOfLife::getBuildSec() {
|
521
|
518
|
}
|
522
|
519
|
|
523
|
520
|
void GameOfLife::setTickSec(float s) {
|
524
|
|
- std::cout << "Set to " << s << std::endl;
|
525
|
521
|
secpertick = s;
|
526
|
522
|
}
|
527
|
523
|
|