Overview
SHA1 Hash: | 6819168095b56207a560e9e55133ca4d9375606e |
---|---|
Date: | 2012-07-14 10:58:20 |
User: | kinaba |
Comment: | Correct parsing of Flooding. |
Timelines: | family | ancestors | descendants | both | trunk |
Diffs: | redesign |
Downloads: | Tarball | ZIP archive |
Other Links: | files | file ages | manifest |
Tags And Properties
- branch=trunk inherited from [16f0b5784f]
- sym-trunk inherited from [16f0b5784f]
Changes
Modified test.d from [23ef619abd528e8f] to [5bf75f7f55fc5b47].
37 // vertical sentinel 37 // vertical sentinel 38 char[] sen = new char[width+2]; 38 char[] sen = new char[width+2]; 39 sen[] = '#'; 39 sen[] = '#'; 40 data = sen.dup ~ data ~ sen; 40 data = sen.dup ~ data ~ sen; 41 41 42 // flooding 42 // flooding 43 water = H-1; 43 water = H-1; 44 string wfws = input.readln().chomp() ~ " "; | 44 while( (line=input.readln()).length ) { 45 wfws ~= input.readln().chomp() ~ " "; | 45 string[] ss = line.split(); 46 wfws ~= input.readln().chomp(); < 47 string[] wfw = wfws.split(); < 48 if(wfw.length==6) { | 46 if(ss.length==2 && ss[0]=="Water") 49 water = H-1 - wfw[1].to!int(); | 47 water = H-1 - ss[1].to!int(); > 48 else if(ss.length==2 && ss[0]=="Flooding") 50 flooding = wfw[3].to!int(); | 49 flooding = ss[1].to!int(); > 50 else if(ss.length==2 && ss[0]=="Waterproof") 51 water_proof = wfw[5].to!int(); | 51 water_proof = ss[1].to!int(); 52 } 52 } 53 } 53 } 54 54 55 @property const 55 @property const 56 { 56 { 57 int W() { return data[0].length; } 57 int W() { return data[0].length; } 58 int H() { return data.length; } 58 int H() { return data.length; }