Differences From Artifact [cde4121762ca0c01]:
- File
src/game.d
- 2012-07-14 11:24:30 - part of checkin [bee0596f0f] on branch trunk - Refactoring. (user: kinaba) [annotate]
To Artifact [545a22e98c8c86c7]:
- File
src/game.d
- 2012-07-14 12:29:17 - part of checkin [9d4aca73fa] on branch trunk - GUI+Solver revived. (user: kinaba) [annotate]
165 } 165 }
166 166
167 void opIndexAssign(char c, Pos p) 167 void opIndexAssign(char c, Pos p)
168 { 168 {
169 this[p.y, p.x] = c; 169 this[p.y, p.x] = c;
170 } 170 }
171 171
172 Pos[] lambdas() { | 172 Pos[] lambdas() const {
173 Pos[] ans; 173 Pos[] ans;
174 for(int y=1; y<=H; ++y) 174 for(int y=1; y<=H; ++y)
175 for(int x=1; x<=W; ++x) 175 for(int x=1; x<=W; ++x)
176 if(this[y,x] == '\\') 176 if(this[y,x] == '\\')
177 ans ~= new Pos(y,x); 177 ans ~= new Pos(y,x);
178 return ans; 178 return ans;
179 } 179 }
180 180
181 bool cleared() | 181 bool cleared() const
182 { 182 {
183 for(int y=1; y<=H; ++y) 183 for(int y=1; y<=H; ++y)
184 for(int x=1; x<=W; ++x) 184 for(int x=1; x<=W; ++x)
185 if(this[y,x] == 'L' || this[y,x] == 'O') 185 if(this[y,x] == 'L' || this[y,x] == 'O')
186 return false; 186 return false;
187 return true; 187 return true;
188 } 188 }