Skip to content

Commit

Permalink
Update IPDTournament-v2.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KingSupernova31 authored Nov 15, 2023
1 parent b6c9002 commit 6a198ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion IPD-v2/IPDTournament-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ const shuffle = function(array) {

const simulate = async function(source, opponentSource, history, timeLimit) {

if (timeLimit === undefined) {
timeLimit = 1000;
}

const sleep = async function(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
Expand Down Expand Up @@ -175,4 +179,4 @@ const runTournament = async function() {
console.log(`${numValidPrograms} bots entered the tournament. The minimum score is 0, and the maximum is ${numValidPrograms * 3}. If all bots had cooperated they would have each gotten ${numValidPrograms * 2} points, and if they had all defeected they would have each gotten ${numValidPrograms}. Final scores:`);
console.log(finalScores);
}
runTournament();
runTournament();

0 comments on commit 6a198ec

Please sign in to comment.