Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Re: chance of winning a battle
Home

[Freeciv-Dev] Re: chance of winning a battle

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: chance of winning a battle
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxxxx>
Date: Thu, 19 Jul 2001 22:00:06 +0300 (IDT)



On Mon, 16 Jul 2001, Trent Piepho wrote:

> > 2. There is a dormant mistake in win_chance.  Line 39 of combat.c should
> > be 
> > int def_N_lose = (dhp+afp-1)/afp;
> 
> This was in my original code.  Thue needed to change it, so he could pretend
> it was his code and not mine, so he added this bug.  The funny thing is you
> will probably get credit for fixing this bug, more credit than I got for
> writing the code without bugs to begin with!  But certain people were never
> very good and giving credit where credit is due.
> 
> He also removed the optimization that you can find the probability of either
> the attacker or defender winning, whichever is faster.  If the defender needs
> to win fewer rounds, find the probability of him winning and just subtract it
> from 1.

true, true, it was in your original code and I don't see it now.
so I would suggest you fix the possible division by zero bug and also
reintroduce optimization in the case att_N_lose > def_N_lose and then I am
sure you will get credit, however belated and belittled it might be.

best,
G.



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