Delete src/main/java/de/lasertag/player/PlayerStats.java via Git Manager GUI
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
package de.lasertag.player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class PlayerStats {
|
||||
|
||||
private final UUID uuid;
|
||||
private String name = "Unknown";
|
||||
private int totalKills;
|
||||
private int totalDeaths;
|
||||
private int totalScore;
|
||||
private int gamesPlayed;
|
||||
private int bestStreak;
|
||||
private int totalBaseAttacks;
|
||||
|
||||
public PlayerStats(UUID uuid) { this.uuid = uuid; }
|
||||
|
||||
public void apply(LaserPlayer lp) {
|
||||
totalKills += lp.getKills();
|
||||
totalDeaths += lp.getDeaths();
|
||||
totalScore += lp.getScore();
|
||||
totalBaseAttacks += lp.getBaseAttacks();
|
||||
gamesPlayed++;
|
||||
if (lp.getBestStreak() > bestStreak) bestStreak = lp.getBestStreak();
|
||||
}
|
||||
|
||||
public double getKDR() {
|
||||
if (totalDeaths == 0) return totalKills;
|
||||
return Math.round(totalKills * 100.0 / totalDeaths) / 100.0;
|
||||
}
|
||||
|
||||
// Getters & Setters
|
||||
public UUID getUuid() { return uuid; }
|
||||
public String getName() { return name; }
|
||||
public void setName(String n) { name = n; }
|
||||
public int getTotalKills() { return totalKills; }
|
||||
public void addKills(int k) { totalKills += k; }
|
||||
public int getTotalDeaths() { return totalDeaths; }
|
||||
public void addDeaths(int d) { totalDeaths += d; }
|
||||
public int getTotalScore() { return totalScore; }
|
||||
public void addScore(int s) { totalScore += s; }
|
||||
public int getGamesPlayed() { return gamesPlayed; }
|
||||
public void addGames(int g) { gamesPlayed += g; }
|
||||
public int getBestStreak() { return bestStreak; }
|
||||
public void setBestStreak(int s) { bestStreak = s; }
|
||||
public int getTotalBaseAttacks() { return totalBaseAttacks; }
|
||||
public void addBaseAttacks(int b) { totalBaseAttacks += b; }
|
||||
}
|
||||
Reference in New Issue
Block a user