Diff
Not logged in

Differences From Artifact [09842c914b3d99f0]:

To Artifact [5d6b45c159e125db]:


216 216 } 217 217 218 218 void opIndexAssign(char c, in Pos p) 219 219 { 220 220 this[p.y, p.x] = c; 221 221 } 222 222 223 - Pos[] lambdas() const { 223 + Pos[] objects(char c) const { 224 224 Pos[] ans; 225 225 for(int y=1; y<=H; ++y) 226 226 for(int x=1; x<=W; ++x) 227 - if(this[y,x] == '\\') 227 + if(this[y,x] == c) 228 228 ans ~= new Pos(y,x); 229 229 return ans; 230 230 } 231 231 232 + Pos[] razors() const { return objects('!'); } 233 + Pos[] lambdas() const { return objects('\\'); } 234 + 232 235 bool cleared() const 233 236 { 234 237 for(int y=1; y<=H; ++y) 235 238 for(int x=1; x<=W; ++x) 236 239 if(this[y,x] == 'L' || this[y,x] == 'O') 237 240 return false; 238 241 return true;