I have been given some code to tinker with, which is a prisoners dilema game are initially the players were set with this piece of code into an array.
IPDPlayer[
Why do you want to have an array right at the very beginning; Use a list and once the input is over, you can always convert it to an array .
List ipdPlayerLst = new ArrayList();
ipdPlayerLst .add(.....);
later
IPDPlayer[] currentPlayers = new IPDPlayer[ipdPlayerLst .size()];
currentPlayers =ipdPlayerLst.toArray(currentPlayers );