From: Michael G. <mic...@gr...> - 2000-09-30 18:57:40
|
Hi! Raimar wrote: > On Mon, Sep 25, 2000 at 05:03:22PM +0200, Raimar Falke wrote: > > On Mon, Sep 25, 2000 at 10:32:33PM +0800, Wong TM (Huang Deming) wrote: > > > > > > Changes: > > > > > > * Ulrich have made a lot of changes to restructure the data structure: > > > - .......wait till I read through the mail. > > > > I think you made the inclusion a bit to fast. The work of Ulrich has made > > aware some questions wrt Score. We now think we how to do it the "right way > > [tm]" so wait for a final version which should come in the next days. > > As promised here is the updated version. It is the result of collaboration > between Ulrich and me. We came to the conclusion that a second loop over all > lines is unnecessary. This also kills the huge "String lines[];" thing. Nice. > A remaining problem are "extra player" (player which aren't declared in the > header). The current solution is to create an array which is big enough to > hold every number of players. Fortunate freeciv is currently limited to 32 > in this respect. > > Another remaining problem is the current implemenation of the relative modus > of PolyLineGroup. It may be possible to let extra players start somewhere in > the graph (see line 380 in Graph) however this doesn't work in the relative > modus. So unknown values are currently set to 0. Another problem is what I reported earlier: the player-numbering is not always continuous. I speculated that this may be a bug in freeciv. It is not. from report.c: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> for (i = 0; tags[i]; i++) { for (n = 0; n < game.nplayers; n++) { if (is_barbarian (&(game.players[n]))) <---------------- NOTE! { continue; <---------------- NOTE! } switch (i) { case 0: fom = total_player_citizens (&(game.players[n])); break; case 1: fom = game.players[n].score.bnp; break; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Barabarians are not added to the log, so they generate gaps in the player numbering. When I open a score-file that has such a gap, 0.6.1-mod breaks: Exception occurred during event dispatching: java.lang.RuntimeException: Incorrect order at org.freeciv.civlog.data.AbstractScore.addPlayer(AbstractScore.java:87) at org.freeciv.civlog.data.SimpleScore.loadScoreFile(SimpleScore.java:246) at org.freeciv.civlog.data.SimpleScore.loadScoreFile(SimpleScore.java:55) I don't know if it still works if you just remove throwing that exception? Michael -- eMail: mic...@gr... PGP key available on request |