BVG.Board.GetDirectionForIntVector C# (CSharp) Method

GetDirectionForIntVector() private method

Gets the equivalent MoveDirection for an IntVector2.
private GetDirectionForIntVector ( IntVector2 vec ) : MoveDirection
vec IntVector2 The IntVector2 we want the direction of.
return MoveDirection
		private MoveDirection GetDirectionForIntVector(IntVector2 vec) {
			foreach (var entry in directionLookup) {
				IntVector2 curr = entry.Value;
				if (curr.x == vec.x && curr.y == vec.y) {
					return entry.Key;
				}
			}
			Debug.LogErrorFormat("Could not get direction for int vector {0}", vec);
			return MoveDirection.NORTH_EAST;
		}