mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-28 11:00:34 +00:00
rulegen:: also number_of_types
This commit is contained in:
parent
c3ba88cb6c
commit
ef712a3b4f
@ -182,6 +182,11 @@ twalker addstep(twalker x) {
|
||||
return x + wstep;
|
||||
}
|
||||
|
||||
int number_of_types() {
|
||||
if(arb::in()) return isize(arb::current.shapes);
|
||||
throw hr_exception("unknown number_of_types");
|
||||
}
|
||||
|
||||
int get_id(cell *c) {
|
||||
if(arb::in()) return shvid(c);
|
||||
throw hr_exception("unknown get_id");
|
||||
@ -2047,7 +2052,7 @@ EX void generate_rules() {
|
||||
current_getside = first_restart_on;
|
||||
current_examine_branch = first_restart_on;
|
||||
|
||||
int NS = isize(arb::current.shapes);
|
||||
int NS = number_of_types();
|
||||
shortcuts.resize(NS);
|
||||
analyzers.resize(NS);
|
||||
for(int i=0; i<NS; i++) analyzers[i].resize(cycle_size(i));
|
||||
|
Loading…
Reference in New Issue
Block a user