public virtual void Move(MoveDirection dir) { MapState state = Game.Current.Dungeon.CurrentMapState; IMap map = state.Map; MoveTestResult moveTest = state.MoveTest(Position, dir); if (moveTest.IsMoveValid && CanMoveInDirection(moveTest)) { if (moveTest.Monster != null) { var attackResult = Attack(moveTest.Monster); OutputAttackResult(attackResult, moveTest.Monster); } else { Position = moveTest.NewPosition; } } }