Closer score calculation

I realized it wasn't it after what I said in the
previous commit. Yet still not exact (±1 pt with
actual score). We'll say that's because of floating
point errors :)
This commit is contained in:
Geoffrey Frogeye 2016-02-13 16:48:53 +01:00
parent dd206307b9
commit 2a52ef67c2

View file

@ -200,7 +200,7 @@ class Drone:
output(self.id, 'D', client.id, product.id, qt) output(self.id, 'D', client.id, product.id, qt)
if client.satisfied(): if client.satisfied():
global score global score
score += math.ceil((T-(self.avail-1))/T*100) score += math.ceil((T-(self.avail+1))/T*100)
log("Client", client.id, "satisfied!", "New score:", score) log("Client", client.id, "satisfied!", "New score:", score)
def wait(self, turns=1): def wait(self, turns=1):