public void updateHighScores( Player player ) {
        int lowestIndex = highScores.size();
        Score currentPlayer;
        currentPlayer = new Score(0, player.getPlayerName(), player.getScore());

        for ( int i = (highScores.size() - 1); i >= 0; i-- ) {
            if ( currentPlayer.getScore() > highScores.get(i).getScore() ) {
                lowestIndex = i;
            }
        } // Find if player beat a high score.

        if ( highScores.size() >= 10 || lowestIndex <= highScores.size() ) {
            highScores.add(lowestIndex, currentPlayer);
            // Add player at index - index of 10 puts it at rank 11.
        } else {
            highScores.add(currentPlayer);
            // If there aren't 10 highscores and it doesn't beat any, 
            // stick on end of list.
        }

        for ( Score score : highScores ) {
            score.setRank((highScores.indexOf(score)) + 1);
        } // Resest ranks

        if ( highScores.size() > 10 ) {
            highScores.remove(10); // Remove score at rank 11.
        }

        writeScoresToDB();
    }