//sets render values to get UI to end the game, adds score to high scores if it is a top ten score public void endGame(int cause) { render.IsGameOver = true; render.cause = cause; render.score = returnScore(); scores.addNewHighScore(player.getPlayerName(), render.score); }