Lambda-Ausdrücke in Backend
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace WorldOfPeacecraft
|
namespace WorldOfPeacecraft
|
||||||
{
|
{
|
||||||
@@ -20,6 +21,10 @@ namespace WorldOfPeacecraft
|
|||||||
private AutoResetEvent InitializedEvent = new AutoResetEvent(false);
|
private AutoResetEvent InitializedEvent = new AutoResetEvent(false);
|
||||||
private bool initialized = false;
|
private bool initialized = false;
|
||||||
private Pathwalker Pathwalker = new Pathwalker();
|
private Pathwalker Pathwalker = new Pathwalker();
|
||||||
|
private Func<Player, bool> isNotBusy = (Player p) => !p.GetBusy();
|
||||||
|
private Func<String, Player, bool> name = (String searchName, Player p) => searchName==p.GetName();
|
||||||
|
private Func<int, Player, Player, bool> rangePlayer = (int maxDis, Player me, Player friend) => maxDis <= distance = new int(Math.Abs (me.GetX() - friend.GetX()) + Math.Abs (me.GetY() - friend.GetY());
|
||||||
|
|
||||||
|
|
||||||
public Backend (IGui gui)
|
public Backend (IGui gui)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user