@@ -219,17 +219,20 @@ { this[p.y, p.x] = c; } - Pos[] lambdas() const { + Pos[] objects(char c) const { Pos[] ans; for(int y=1; y<=H; ++y) for(int x=1; x<=W; ++x) - if(this[y,x] == '\\') + if(this[y,x] == c) ans ~= new Pos(y,x); return ans; } + Pos[] razors() const { return objects('!'); } + Pos[] lambdas() const { return objects('\\'); } + bool cleared() const { for(int y=1; y<=H; ++y) for(int x=1; x<=W; ++x)