From: Rick W. <wes...@pu...> - 2010-01-20 14:15:15
|
brett lentz wrote: > It's a play option for those that want it, It defaults to being > disabled. The Simtex 1830 game had it. > > Other than requiring a lot of tedious XML editing, it's easy to > support, so I see no reason not to add it. > > ---Brett. > The problem with tedious (and repetitive) XML is that it leads to tedious and much harder debugging. One's eyes tend to glaze over when comparing a game's tile manifest. As an example, when looking at tile #1 in order to check that the manifest correct, which is the easier XML to debug? <Tile id="1" quantity="1" /> --- <Tile id="1"> <IfOption name="UnlimitedTiles" value="no"> <Attributes quantity="1"/> </IfOption> <IfOption name="UnlimitedTiles" value="yes"> <Attributes quantity="-1"/> </IfOption> </Tile> Obviously the first single line is easier. Especially when looking at 50+ tiles. It becomes hard to make sure all of the ones and the negative ones are correct. A rule of thumb that I use with my student programmers (and with myself and with my fellow professional programmers) is that whenever I find myself doing copy'n'paste then I should stop and ask myself, how can I do this better? I.e., in a programmatic way? I would prefer to see either: <Tile id="1" quantity="1" unlimited="-1"> Or better yet only exceptions to the rule if a given tile is not suppose to be unlimited. <Tile id="4" quantity="2" nounlimited> Of course this will require program changes which, given my limited Java skills, I can not create. Still I hope that someone more capable agrees with me that copy'n'paste is sloppy and thus will create such code. -- Rick Westerman wes...@pu... Bioinformatics specialist at the Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department of Horticulture and Landscape Architecture 625 Agriculture Mall Drive West Lafayette, IN 47907-2010 Physically located in room S049, WSLR building |