From 05596b89bd72091bc0812b709ff1863324039fc0 Mon Sep 17 00:00:00 2001 From: Samed Bektas Date: Fri, 16 May 2014 11:42:32 +0200 Subject: [PATCH] Klammersetzung... --- src/Player.cs | 67 +++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/src/Player.cs b/src/Player.cs index 23e0ddb..1c42d70 100644 --- a/src/Player.cs +++ b/src/Player.cs @@ -1,45 +1,50 @@ namespace WorldOfPeacecraft { - public class Player : Entity, IPlayer - { - private int Score; + public class Player : Entity, IPlayer + { + private int Score; - public delegate void LocationChangedEventHandler (int x, int y); - public event LocationChangedEventHandler LocationChanged; + public delegate void LocationChangedEventHandler(int x, int y); + public event LocationChangedEventHandler LocationChanged; - public Player (int id, int posX, int posY, string desc, bool busy, int score) : base(id, posX, posY, desc, busy) - { - this.SetScore(score); - } + public Player(int id, int posX, int posY, string desc, bool busy, int score) + : base(id, posX, posY, desc, busy) + { + this.SetScore(score); + } - public void SetScore(int score) - { - this.Score = score; - } + public void SetScore(int score) + { + this.Score = score; + } - public int GetScore () - { - return Score; - } + public int GetScore() + { + return Score; + } - public string GetName () - { - return Desc; - } + public string GetName() + { + return Desc; + } - public override void SetPos (int x, int y) - { - bool positionChanged = false; - if (x != GetX() || y != GetY ()) - positionChanged = true; - base.SetPos (x, y); - if (positionChanged && LocationChanged != null) - LocationChanged(x, y); - } + public override void SetPos(int x, int y) + { + bool positionChanged = false; + if (x != GetX() || y != GetY()) + { + positionChanged = true; + base.SetPos(x, y); + } + if (positionChanged && LocationChanged != null) + { + LocationChanged(x, y); + } + } public override string ToString() { return "Player: " + Id + " " + Coord.X + " " + Coord.Y + " " + Desc + " " + Busy + " " + Score; } - } + } }