CellsAutomate.Creatures.BaseCreature.MyTurn C# (CSharp) 메소드

MyTurn() 공개 메소드

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
리턴 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);
        }