Diff
Not logged in

Differences From Artifact [545a22e98c8c86c7]:

To Artifact [17dbdc662950a670]:


145 // Adjust coordinate to the spec. bottom-left is (1,1). 145 // Adjust coordinate to the spec. bottom-left is (1,1). 146 --y, --x; 146 --y, --x; 147 if(y<0||H<=y||x<0||W<=x) 147 if(y<0||H<=y||x<0||W<=x) 148 return '#'; 148 return '#'; 149 return data[H-1-y][x]; 149 return data[H-1-y][x]; 150 } 150 } 151 151 152 char opIndex(Pos p) | 152 char opIndex(in Pos p) 153 { 153 { 154 return this[p.y, p.x]; 154 return this[p.y, p.x]; 155 } 155 } 156 } 156 } 157 157 158 void opIndexAssign(char c, int y, int x) 158 void opIndexAssign(char c, int y, int x) 159 { 159 { ................................................................................................................................................................................ 160 // Adjust coordinate to the spec. bottom-left is (1,1). 160 // Adjust coordinate to the spec. bottom-left is (1,1). 161 --y, --x; 161 --y, --x; 162 if(y<0||H<=y||x<0||W<=x) 162 if(y<0||H<=y||x<0||W<=x) 163 return; 163 return; 164 data[H-1-y][x] = c; 164 data[H-1-y][x] = c; 165 } 165 } 166 166 167 void opIndexAssign(char c, Pos p) | 167 void opIndexAssign(char c, in 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() const { 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)