Setter für das Backend
This commit is contained in:
@@ -9,27 +9,47 @@ namespace Frontend
|
||||
private Receiver Rec;
|
||||
private Parser Parse;
|
||||
private TcpClient Client;
|
||||
private Dictionary<int, Dragon> Dragons;
|
||||
private Dictionary<int, Player> Players;
|
||||
private Map Map;
|
||||
|
||||
public Backend ()
|
||||
{
|
||||
Parse = new Parser();
|
||||
Client = new TcpClient("localhost",9999);
|
||||
Rec = new Receiver(Client, Parse);
|
||||
Dragons = new Dictionary<int, Dragon>();
|
||||
Players = new Dictionary<int, Player>();
|
||||
}
|
||||
|
||||
public IEnumerable<IPositionable> getDragons()
|
||||
{
|
||||
return null;
|
||||
return Dragons.Values;
|
||||
}
|
||||
|
||||
public IEnumerable<IPositionable> getPlayers()
|
||||
{
|
||||
return null;
|
||||
return Players.Values;
|
||||
}
|
||||
|
||||
public void SetDragon (Dragon dragon)
|
||||
{
|
||||
Dragons[dragon.GetId()] = dragon;
|
||||
}
|
||||
|
||||
public void SetPlayer (Player player)
|
||||
{
|
||||
Players[player.GetId()] = player;
|
||||
}
|
||||
|
||||
public void SetMap (Map map)
|
||||
{
|
||||
this.Map = map;
|
||||
}
|
||||
|
||||
public ITile[,] getMap()
|
||||
{
|
||||
return null;
|
||||
return Map.GetTiles();
|
||||
}
|
||||
|
||||
public void sendCommand(string command)
|
||||
|
||||
Reference in New Issue
Block a user