SnakeBattleNet.Core.BattleField.RelativeCell C# (CSharp) Method

RelativeCell() public method

public RelativeCell ( Direction direction, Position fieldHead, Position chipHead, Position chipCell ) : Cell
direction Direction
fieldHead SnakeBattleNet.Core.Contract.Position
chipHead SnakeBattleNet.Core.Contract.Position
chipCell SnakeBattleNet.Core.Contract.Position
return Cell
        public Cell<Content> RelativeCell(Direction direction, Position fieldHead, Position chipHead, Position chipCell)
        {
            switch (direction)
            {
                case Direction.North:
                    return NorthView(fieldHead, chipHead, chipCell);
                case Direction.West:
                    return WestView(fieldHead, chipHead, chipCell);
                case Direction.East:
                    return EastView(fieldHead, chipHead, chipCell);
                case Direction.South:
                    return SouthView(fieldHead, chipHead, chipCell);
                default:
                    throw new ArgumentOutOfRangeException("direction");
            }
        }