public Player(Coordonates position) { this.Position = position; moveStrategies = new Dictionary <Cardinal, IMoveStrategy>(); moveStrategies.Add(Cardinal.N, new UpMoveStrategy()); moveStrategies.Add(Cardinal.S, new DownMoveStrategy()); moveStrategies.Add(Cardinal.V, new LeftMoveStrategy()); moveStrategies.Add(Cardinal.E, new RightMoveStrategy()); }
public void ExecuteMove(Coordonates coordonates) { coordonates.X++; Console.WriteLine("R"); }
public void ExecuteMove(Coordonates coordonates) { coordonates.Y--; Console.WriteLine("D"); }
public void UpdatePosition(Coordonates position) { Position = position; }