Remove player und Remove dragon im Backend
This commit is contained in:
@@ -15,31 +15,41 @@ namespace Frontend
|
||||
|
||||
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>();
|
||||
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()
|
||||
public IEnumerable<IPositionable> getDragons ()
|
||||
{
|
||||
return Dragons.Values;
|
||||
}
|
||||
|
||||
public IEnumerable<IPositionable> getPlayers()
|
||||
public IEnumerable<IPositionable> getPlayers ()
|
||||
{
|
||||
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)
|
||||
{
|
||||
Dragons[dragon.GetId()] = dragon;
|
||||
Dragons [dragon.GetId ()] = dragon;
|
||||
}
|
||||
|
||||
public void SetPlayer (Player player)
|
||||
{
|
||||
Players[player.GetId()] = player;
|
||||
Players [player.GetId ()] = player;
|
||||
}
|
||||
|
||||
public void SetMap (Map map)
|
||||
@@ -47,16 +57,16 @@ namespace Frontend
|
||||
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