CellsAutomate.Creatures.BaseCreature.MyTurn C# (CSharp) Method

MyTurn() public method

public MyTurn ( FoodMatrix eatMatrix, Membrane creatures, Point position, Random random, bool hasOneBite, int energyPoints ) : DirectionEnum>.Tuple
eatMatrix CellsAutomate.Food.FoodMatrix
creatures Membrane
position Point
random System.Random
hasOneBite bool
energyPoints int
return DirectionEnum>.Tuple
        public Tuple<ActionEnum, DirectionEnum> MyTurn(FoodMatrix eatMatrix, Membrane[,] creatures, Point position, 
            Random random, bool hasOneBite, int energyPoints)
        {
            var action = GetAction(random, hasOneBite, energyPoints);
            var direction = (action == ActionEnum.Eat || action == ActionEnum.MakeChild)
                ? DirectionEnum.Stay : GetDirection(eatMatrix, creatures, position, random);
            return Tuple.Create(action, direction);
        }