Tweaks to clean/clarify things

This commit is contained in:
Joseph Prezioso Jr 2016-03-29 17:50:06 -04:00
parent 51cd770d38
commit 6048c97b52
5 changed files with 14 additions and 7 deletions

View File

@ -81,8 +81,6 @@ public class EloManager extends MiniDbClientPlugin<EloClientData>
return CalculateDivision(percentile); return CalculateDivision(percentile);
} }
//CalculateDivision copied from EloDivision for testing purposes
//will remove/alter one or both of them as needed
public String CalculateDivision(double divPercent) public String CalculateDivision(double divPercent)
{ {
if (divPercent == 100) return "Diamond"; if (divPercent == 100) return "Diamond";

View File

@ -13,4 +13,9 @@ public class EloPlayer
System.out.println(UniqueId + "'s elo is " + Rating); System.out.println(UniqueId + "'s elo is " + Rating);
} }
public void setDivision(String newDivision)
{
_division = newDivision;
}
} }

View File

@ -13,18 +13,18 @@ public class EloSettings {
public int getEloSetting() public int getEloSetting()
{ {
int settingEnum = 0; int settingNum = 0;
if(_backendElo) if(_backendElo)
{ {
settingEnum = 1; settingNum = 1;
} }
else if (_fullElo) else if (_fullElo)
{ {
settingEnum = 2; settingNum = 2;
} }
return settingEnum; return settingNum;
} }
public void setEloSetting(int newSetting) public void setEloSetting(int newSetting)

View File

@ -3,6 +3,8 @@ package mineplex.core.game;
import org.bukkit.DyeColor; import org.bukkit.DyeColor;
import org.bukkit.Material; import org.bukkit.Material;
import mineplex.core.elo.EloSettings;
public enum GameDisplay public enum GameDisplay
{ {
//Mini //Mini
@ -88,6 +90,8 @@ public enum GameDisplay
private int _gameId; // Unique identifying id for this gamemode (used for statistics) private int _gameId; // Unique identifying id for this gamemode (used for statistics)
public int getGameId() { return _gameId; } public int getGameId() { return _gameId; }
private EloSettings EloSetting = new EloSettings(0);
GameDisplay(String name, Material mat, byte data, GameCategory gameCategory, int gameId) GameDisplay(String name, Material mat, byte data, GameCategory gameCategory, int gameId)
{ {
this(name, name, mat, data, gameCategory, gameId); this(name, name, mat, data, gameCategory, gameId);

View File

@ -316,7 +316,7 @@ public abstract class Game implements Listener
public String Winner = "Nobody"; public String Winner = "Nobody";
public GameTeam WinnerTeam = null; public GameTeam WinnerTeam = null;
//EloSetting - experimental //EloSetting - experimental (0 = disabled, 1 = background, 2 = full)
public EloSettings EloSetting = new EloSettings(0); public EloSettings EloSetting = new EloSettings(0);
public boolean EloRanking = false; public boolean EloRanking = false;