From: Eric McDonald <mcdonald@phy.cmich.edu>
To: Lincoln Peters <sampln@sbcglobal.net>
Cc: Xconq list <xconq7@sources.redhat.com>
Subject: Re: Calculating net material production
Date: Mon, 06 Sep 2004 18:51:00 -0000 [thread overview]
Message-ID: <413B937C.9060609@phy.cmich.edu> (raw)
In-Reply-To: <1094422286.4338.21419.camel@localhost>
Lincoln Peters wrote:
> Is there any code already in place to track such statistics? Or will I
> have to perform deeper code surgery to do this?
I think there is already something that sums up total materials
possessed by a side. It is used in the materials display beneath the
units type list in the Tcl/Tk interface. If the basic calculation behind
this is not already in the kernel, then it could probably be moved
there, and you could call it at the end of each turn and update some
arrays (of length 'nummtypes') that would allow you to maintain a
running average of the rates of production:
m_prod_avg[m] += (m_at_turn_end[m] - m_at_last_turn_end[m]) / 2;
or something like that.
Eric
prev parent reply other threads:[~2004-09-05 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-05 22:30 Lincoln Peters
2004-09-06 18:51 ` Eric McDonald [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=413B937C.9060609@phy.cmich.edu \
--to=mcdonald@phy.cmich.edu \
--cc=sampln@sbcglobal.net \
--cc=xconq7@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).