Complete.Org: Mailing Lists: Archives: freeciv-java: December 2001:
[FreeCiv-Java] Advice needed about techs

[FreeCiv-Java] Advice needed about techs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "freeciv-java mailing list" <freeciv-java@xxxxxxxxxxx>
Subject: [FreeCiv-Java] Advice needed about techs
From: "Ben Mazur" <bmazur@xxxxxxx>
Date: Thu, 13 Dec 2001 20:25:59 -0800


As you may have noticed from the CVS commit logs, I've been
working away on many of the dialogs in the Java client.
Along the way, I've been implementing some of the missing
reporting methods in Player, City, Game, etc.  So far so
good, but this latest one has me needing some advice.

The known techs/advances are passed between client and
server as bit strings, which are read by the Java client
into an array of booleans.  In the C client, they're read
from the server into an array of ints, with 0 corresponding
to TECH_UNKNOWN and 1 for TECH_KNOWN.  The problem is that
on the C client they sometimes change to TECH_MARKED and

Do I change the array type in the Java client to ints and
rework anything accessing it accordingly?  AFAIK, the two
additional values are needed exclusively by the Science
dialog (to determine reachable techs and to count the number
of techs need for a specific "goal" tech.)  Should I just
use a different strategy in the Science dialog and hope that
nothing else needs these two values?

Please advise,
Ben Mazur

[Prev in Thread] Current Thread [Next in Thread]