1. Peter Hosey
  2. BitTorrent simulation

Commits

Peter Hosey  committed 676a0ae

Delete the oldest peer, not a random peer.

  • Participants
  • Parent commits 7297511
  • Branches default

Comments (0)

Files changed (1)

File bt.pjs

View file
  • Ignore whitespace
 
 void removePeer()
 {
-  int i = int(random(0,peers.size() - 1));
+  int i = 0;
   Peer toRemove = (Peer)peers.get(i);
   toRemove.removing = 1;
 }