Many methods have been deprecated -- for greater flexibility you should migrate to the replacement methods
as soon as is practical. Hopefully these will imprOve the code. For example:
CellOccupant[] neighbors;
neighbors = getHostCell().getNeighboringOccupants();
for (int i = 0; i < neighbors.length; i++) {
currScore = ((CoordinationGamePlayer)neighbors[i]).totalSc ore;
if (currScore > bestScore) {
bestScore = currScore;
myColor = ((CoordinationGamePlayer)neighbors[i]).getColor();
}
}
List neighbors = findNeighborsOnHost();
for (Object neighbor : neighbors) {
currScore = ((CoordinationGamePlayer) neighbor).totalScore;
if (currScore > bestScore) {
bestScore = currScore;
myColor = ((CoordinationGamePlayer) neighbor).getColor();
}
}
And actually there is a much better way to do even that now, but we won't get into that...