package electrosphere.game.server.structure.virtual;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

/**
 * Server representation of a structure
 */
public class Structure {
    int worldX;
    int worldY;
    float locationX;
    float locationY;
    String type;
    
    HashMap<String,Object> data = new HashMap<String,Object>();
    
    LinkedList<String> dataKeys = new LinkedList<String>();

    public Structure(int worldX, int worldY, float locationX, float locationY, String type) {
        this.worldX = worldX;
        this.worldY = worldY;
        this.locationX = locationX;
        this.locationY = locationY;
        this.type = type;
    }
    
    public void putData(String key, Object o){
        data.put(key,o);
        dataKeys.add(key);
    }
    
    public List<String> getDataKeys(){
        return dataKeys;
    }
    
    public Object getData(String key){
        return data.get(key);
    }

    public int getWorldX() {
        return worldX;
    }

    public int getWorldY() {
        return worldY;
    }

    public float getLocationX() {
        return locationX;
    }

    public float getLocationY() {
        return locationY;
    }

    public String getType() {
        return type;
    }
    
    
    
}
