Remove player und Remove dragon im Backend
This commit is contained in:
@@ -15,31 +15,41 @@ namespace Frontend
|
|||||||
|
|
||||||
public Backend ()
|
public Backend ()
|
||||||
{
|
{
|
||||||
Parse = new Parser();
|
Parse = new Parser ();
|
||||||
Client = new TcpClient("localhost",9999);
|
Client = new TcpClient ("localhost", 9999);
|
||||||
Rec = new Receiver(Client, Parse);
|
Rec = new Receiver (Client, Parse);
|
||||||
Dragons = new Dictionary<int, Dragon>();
|
Dragons = new Dictionary<int, Dragon> ();
|
||||||
Players = new Dictionary<int, Player>();
|
Players = new Dictionary<int, Player> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IPositionable> getDragons()
|
public IEnumerable<IPositionable> getDragons ()
|
||||||
{
|
{
|
||||||
return Dragons.Values;
|
return Dragons.Values;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IPositionable> getPlayers()
|
public IEnumerable<IPositionable> getPlayers ()
|
||||||
{
|
{
|
||||||
return Players.Values;
|
return Players.Values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeDragon (Dragon dragon)
|
||||||
|
{
|
||||||
|
Dragons.Remove (dragon.GetId ());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removePlayer (Player player)
|
||||||
|
{
|
||||||
|
Players.Remove (player.GetId ());
|
||||||
|
}
|
||||||
|
|
||||||
public void SetDragon (Dragon dragon)
|
public void SetDragon (Dragon dragon)
|
||||||
{
|
{
|
||||||
Dragons[dragon.GetId()] = dragon;
|
Dragons [dragon.GetId ()] = dragon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPlayer (Player player)
|
public void SetPlayer (Player player)
|
||||||
{
|
{
|
||||||
Players[player.GetId()] = player;
|
Players [player.GetId ()] = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMap (Map map)
|
public void SetMap (Map map)
|
||||||
@@ -47,16 +57,16 @@ namespace Frontend
|
|||||||
this.Map = map;
|
this.Map = map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITile[,] getMap()
|
public ITile[,] getMap ()
|
||||||
{
|
{
|
||||||
return Map.GetTiles();
|
return Map.GetTiles ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendCommand(string command)
|
public void sendCommand (string command)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendChat(string message)
|
public void sendChat (string message)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user