Added fairness to mockOuput list so the index will correspond to the player in order that they entered the hosted game, #story[1010]

This commit is contained in:
Fan-Wu Yang
2017-07-24 17:40:46 +12:00
parent cfd858194e
commit eec0cb3493
@@ -29,7 +29,7 @@ public class ConnectionAcceptor implements Runnable {
*/
private ServerSocket serverSocket;
//mock outputs
private ArrayBlockingQueue<MockOutput> mockOutputList = new ArrayBlockingQueue<>(16);
private ArrayBlockingQueue<MockOutput> mockOutputList = new ArrayBlockingQueue<>(16, true);
//latest messages
private LatestMessages latestMessages;
//Acknowledgement number for packets
@@ -198,5 +198,4 @@ public class ConnectionAcceptor implements Runnable {
return this.ackNumber;
}
}