Skip to content

Commit

Permalink
Minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtch committed Dec 19, 2016
1 parent 970b5ac commit 6583e49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def step(self):
and self.requestList.next().isReady(self.time) \
and len(responsePackets) <= MAX_PACKETS_PER_STEP:
headPacket = self.requestList.pop()
if headPacket.arriveTime() < self.time:
headPacket.addLatency(self.time - headPacket.arriveTime())
for i in xrange(1, self.num_players + 1):
newPacket = headPacket.deepcopy()
newPacket.sender = 0
Expand Down
2 changes: 1 addition & 1 deletion device.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from random import randint
from data import Data

TICKS_PER_EVENT = 500
TICKS_PER_EVENT = 60

class Device(object):
cloud_id = 0
Expand Down

0 comments on commit 6583e49

Please sign in to comment.