Some basic ideas for Elo I will be experimenting with
This commit is contained in:
parent
d8d952691b
commit
38a079846d
@ -2,6 +2,7 @@ package mineplex.core.elo;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
import mineplex.core.MiniDbClientPlugin;
|
||||
@ -46,6 +47,28 @@ public class EloManager extends MiniDbClientPlugin<EloClientData>
|
||||
return elo;
|
||||
}
|
||||
|
||||
//get a player's Division
|
||||
public String getPlayerDivision(UUID uuid, String gameType)
|
||||
{
|
||||
String updatedDivision = "";
|
||||
|
||||
//get playerElo for gametype (need to store this to check it against other Elo's)
|
||||
int playerElo = getElo(uuid, gameType);
|
||||
//this list will be filled with ELO's from other players (but only for the same game type
|
||||
ArrayList otherElos = new ArrayList();
|
||||
|
||||
for(int i = 0; i < _playerElos.size(); i++)
|
||||
{
|
||||
//we're only concerned with this Game Type
|
||||
if(_playerElos.containsKey(gameType))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return updatedDivision;
|
||||
}
|
||||
|
||||
public EloTeam getNewRatings(EloTeam teamA, EloTeam teamB, GameResult result)
|
||||
{
|
||||
EloTeam newTeam = new EloTeam();
|
||||
|
@ -5,8 +5,12 @@ public class EloPlayer
|
||||
public String UniqueId;
|
||||
public int Rating;
|
||||
|
||||
//Division stuff (to be implemented, pending review)
|
||||
private String _division;
|
||||
|
||||
public void printInfo()
|
||||
{
|
||||
System.out.println(UniqueId + "'s elo is " + Rating);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user