From 96e1501a03bfdfc0716d7562c35ad4322f5506fe Mon Sep 17 00:00:00 2001 From: ys037 <ys037@hdm-stuttgart.de> Date: Mon, 11 Dec 2023 18:41:49 +0100 Subject: [PATCH] Refactored attributes of class PlayerStatistics --- .../Persistance/Classes/PlayerStatistics.java | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Persistance/Classes/PlayerStatistics.java b/src/main/java/de/hdm_stuttgart/battlearena/Persistance/Classes/PlayerStatistics.java index fc315ba1..caee1716 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Persistance/Classes/PlayerStatistics.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Persistance/Classes/PlayerStatistics.java @@ -8,19 +8,19 @@ public class PlayerStatistics { private String playerID; private String playerName; - private int playerLost; - private int playerWonRate; - private int playerKills; - private int playerDeaths; + private int gamesLost; + private int gamesWon; + private int kills; + private int deaths; private int blocksDestroyed; private int gameTime; - public PlayerStatistics(String playerName, int playerLost, int playerWonRate, int playerKills, int playerDeaths, int blocksDestroyed, int gameTime) { + public PlayerStatistics(String playerName, int gamesLost, int gamesWon, int kills, int deaths, int blocksDestroyed, int gameTime) { this.playerName = playerName; - this.playerLost = playerLost; - this.playerWonRate = playerWonRate; - this.playerKills = playerKills; - this.playerDeaths = playerDeaths; + this.gamesLost = gamesLost; + this.gamesWon = gamesWon; + this.kills = kills; + this.deaths = deaths; this.blocksDestroyed = blocksDestroyed; this.gameTime = gameTime; } @@ -33,36 +33,36 @@ public class PlayerStatistics { this.playerName = playerName; } - public int getPlayerLost() { - return playerLost; + public int getGamesLost() { + return gamesLost; } - public void setPlayerLost(int playerLost) { - this.playerLost = playerLost; + public void setGamesLost(int gamesLost) { + this.gamesLost = gamesLost; } - public int getPlayerWonRate() { - return playerWonRate; + public int getGamesWon() { + return gamesWon; } - public void setPlayerWonRate(int playerWonRate) { - this.playerWonRate = playerWonRate; + public void setGamesWon(int gamesWon) { + this.gamesWon = gamesWon; } - public int getPlayerKills() { - return playerKills; + public int getKills() { + return kills; } - public void setPlayerKills(int playerKills) { - this.playerKills = playerKills; + public void setKills(int kills) { + this.kills = kills; } - public int getPlayerDeaths() { - return playerDeaths; + public int getDeaths() { + return deaths; } - public void setPlayerDeaths(int playerDeaths) { - this.playerDeaths = playerDeaths; + public void setDeaths(int deaths) { + this.deaths = deaths; } public int getBlocksDestroyed() { -- GitLab