mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-03 04:39:17 +00:00
improved correctness checking for Archimedean symbols: 6,5 or 6,4,2 are no longer valid
This commit is contained in:
parent
9e06993bb4
commit
2aec7b7691
@ -170,13 +170,24 @@ void archimedean_tiling::prepare() {
|
||||
errors++;
|
||||
return;
|
||||
}
|
||||
if(isize(faces) < 2) {
|
||||
|
||||
for(int i: faces) if(i < 2) {
|
||||
errormsg = XLAT("not enough edges");
|
||||
errors++;
|
||||
return;
|
||||
}
|
||||
|
||||
vector<int> nondigonal;
|
||||
for(int i: faces) if(i > 2) nondigonal.push_back(i);
|
||||
|
||||
if(isize(faces) < 2 || isize(nondigonal) == 1) {
|
||||
errormsg = XLAT("not enough faces");
|
||||
errors++;
|
||||
return;
|
||||
}
|
||||
for(int i: faces) if(i < 2) {
|
||||
errormsg = XLAT("not enough edges");
|
||||
|
||||
if(isize(nondigonal) == 2 && faces[0] != faces[1]) {
|
||||
errormsg = XLAT("invalid dihedron");
|
||||
errors++;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user