+ Added super basic initial implementaiton of realm visualization and input

This commit is contained in:
Matthew Cech
2019-09-13 00:28:26 -07:00
parent e81e0972a3
commit b96d96c849
5 changed files with 146 additions and 35 deletions
@@ -1,37 +1,71 @@
package commands.dew.adapter;
import commands.dew.core.api.IDewPlayer;
import commands.dew.core.data.DewRealm;
import dataStructures.KittyUser;
public class KittyAdapterDewPlayer implements IDewPlayer
{
private KittyUser user;
private String realmID;
private int x;
private int y;
public KittyAdapterDewPlayer(DewRealm realm, KittyUser user, int x, int y)
{
this.user = user;
this.realmID = realm.id;
this.x = x;
this.y = y;
}
public String getVisual()
{
return user.name.length() >= 1 ? user.name.substring(0, 1) : "@";
}
public boolean isUser(KittyUser user)
{
return user.uniqueID == user.uniqueID;
}
public void setRealmPos(int x, int y)
{
this.x = x;
this.y = y;
}
////////////////////////////
// Interface requirements //
////////////////////////////
@Override
public String getName() {
// TODO Auto-generated method stub
return null;
public String getName()
{
return user.name;
}
@Override
public String getUniqueID() {
// TODO Auto-generated method stub
return null;
public String getUniqueID()
{
return user.uniqueID;
}
@Override
public String getCurrentRealm() {
// TODO Auto-generated method stub
return "0";
public String getCurrentRealmID()
{
return realmID;
}
@Override
public int getRealmX() {
// TODO Auto-generated method stub
return 0;
public int getRealmX()
{
return x;
}
@Override
public int getRealmY() {
// TODO Auto-generated method stub
return 0;
public int getRealmY()
{
return y;
}
}