public void setPlayers() { for (int i = 0; i < GameCore.PLAYER_AMOUNT; i++) // for loop to initialize every instance of 'PlayerClass' { players[i].setName(); GUI.addPlayer(players[i].getName(), players[i].account.getBalance(), col[i]); } }
public void playerPosUpdate(String pname, int pos, int index) { GUI.removeAllCars(pname); players[index].setPlayerPos(pos, pname); }