mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-09 07:30:09 +00:00
rogueviz::kohonen:: halt with error when reading graph unsuccessfully
This commit is contained in:
parent
0d691ab16a
commit
6336fe9db6
@ -1100,7 +1100,12 @@ void load_edges(const string& fname_edges, string edgename, int pick = 0) {
|
|||||||
distribute_neurons();
|
distribute_neurons();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for(auto p: edgedata2)
|
for(auto p: edgedata2)
|
||||||
addedge(p.first, p.second, 1 / (i+++.5), true, t);
|
if(p.first >= 0 && p.second >= 0)
|
||||||
|
addedge(p.first, p.second, 1 / (i+++.5), true, t);
|
||||||
|
else {
|
||||||
|
printf("error reading graph\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void random_edges(int q) {
|
void random_edges(int q) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user