Diff
Not logged in

Differences From Artifact [36818da9efe958b4]:

To Artifact [487b856e16418ffe]:


151 if(!lambda) 151 if(!lambda) 152 next[y][x] = 'O'; 152 next[y][x] = 'O'; 153 } 153 } 154 } 154 } 155 data = next; 155 data = next; 156 156 157 if(flooding) { 157 if(flooding) { 158 flooding_counter ++; < 159 if(flooding_counter == flooding) { < 160 flooding_counter = 0; < 161 water --; < 162 } < 163 bool wa = false; 158 bool wa = false; 164 for(int y=water; y+1<H; ++y) 159 for(int y=water; y+1<H; ++y) 165 for(int x=1; x+1<W; ++x) 160 for(int x=1; x+1<W; ++x) 166 if(data[y][x]=='R') { 161 if(data[y][x]=='R') { 167 wa = true; 162 wa = true; 168 underwater++; 163 underwater++; 169 if(underwater > water_proof) 164 if(underwater > water_proof) 170 dead = true; 165 dead = true; 171 } 166 } 172 if(!wa) | 167 flooding_counter ++; > 168 if(flooding_counter == flooding) { > 169 flooding_counter = 0; 173 underwater = 0; | 170 water --; > 171 } 174 } 172 } 175 } 173 } 176 174 177 int clever() 175 int clever() 178 { 176 { 179 if(dead) 177 if(dead) 180 return 0; 178 return 0;