private static void sortByScores(List<ProgramScore> progScores) {
		Collections.sort(progScores, new Comparator<ProgramScore>() {
			@Override
			public int compare(ProgramScore o1, ProgramScore o2) {
				AllLengthScore score1 = o1.getScore();
				AllLengthScore score2 = o2.getScore();

				final int winsCompare = score2.getLengthsWon()
						- score1.getLengthsWon();
				if (winsCompare != 0)
					return winsCompare;

				final int basicCompare = score2.basicScore()
						- score1.basicScore();
				if (basicCompare != 0)
					return basicCompare;

				final int lostCompare = score2.getLostMoves()
						- score1.getLostMoves();
				if (lostCompare != 0)
					return lostCompare;

				final int drawCompare = score2.getDrawnMoves()
						- score1.getDrawnMoves();
				if (drawCompare != 0)
					return drawCompare;

				final int wonCompare = score1.getWonMoves()
						- score2.getWonMoves();
				if (wonCompare != 0)
					return wonCompare;

				return 0;
			}
		});
	}