#include "prefix_search.h" void prefix_search::add(std::string prefix) { node* cur = ⊤ for (int c : prefix) { cur = &cur->children[c]; } cur->match = true; } int prefix_search::match(std::string in) const { int ret = 0; const node* cur = ⊤ for (int c : in) { if (cur->children.count(c) == 0) { return 0; } cur = &cur->children.at(c); ret++; if (cur->match) { return ret; } } return 0; } ='lingo2-archipelago Git repository'/>
about summary refs log tree commit diff stats
path: root/data/maps/the_butterfly/rooms/Mastery.txtpb
blob: bbe87426c8e5882aa2da5862d6eaf3c1681d0e68 (plain) (blame)
1
2
3
4
5
name: "Mastery"
masteries {
  name: "MASTERY"
  path: "Components/Collectables/collectable"
}