Skip to content

Commit

Permalink
Simple tests for cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
janton01 committed Dec 17, 2016
1 parent f543769 commit cd61056
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
HI_P_CLOUD_DELAY = 10
MED_P_CLOUD_DELAY = 5
LOW_P_CLOUD_DELAY = 3
NUM_PLAYERS = 10

class Cloud(object):

Expand All @@ -21,6 +20,7 @@ def __init__(self, gameTraffic, location, timeout, num_players):
else:
self.timeToProcess = HIGH_P_CLOUD_DELAY

self.num_players = num_players
self.location = location
self.timeMS = 0
self.timeout = timeout
Expand All @@ -36,7 +36,7 @@ def processResponse(self, time):
return None
else:
responsePackets = []
for i in range(1,NUM_PLAYERS):
for i in range(1,self.num_players):
newPacket = headPacket

# update packet
Expand Down
2 changes: 1 addition & 1 deletion testCloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
if __name__ == "__main__":

packet1 = packet.Packet(0, 100, 0, 0, 1)
packet2 = packet.Packet(0, 100, 0, 0, 2)
packet2 = packet.Packet(0, 0, 0, 0, 2)
cloud = cloud.Cloud(0, 0, 10, 10)
cloud.receiveRequest(packet1)

Expand Down

0 comments on commit cd61056

Please sign in to comment.