From 1fd64dccbeadc1acf0383400f9879d70dc369c55 Mon Sep 17 00:00:00 2001 From: Daniel Herrmann Date: Fri, 23 May 2014 11:04:56 +0200 Subject: [PATCH] =?UTF-8?q?Lambda-Ausdr=C3=BCcke=20in=20Backend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Backend.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Backend.cs b/src/Backend.cs index 579d723..2d89187 100644 --- a/src/Backend.cs +++ b/src/Backend.cs @@ -1,6 +1,7 @@ using System.Net.Sockets; using System.Collections.Generic; using System.Threading; +using System; namespace WorldOfPeacecraft { @@ -20,6 +21,10 @@ namespace WorldOfPeacecraft private AutoResetEvent InitializedEvent = new AutoResetEvent(false); private bool initialized = false; private Pathwalker Pathwalker = new Pathwalker(); + private Func isNotBusy = (Player p) => !p.GetBusy(); + private Func name = (String searchName, Player p) => searchName==p.GetName(); + private Func 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) {