Beispiel #1
0
        // #TODO: TEST ME
        // TO BE OVERRIDDEN BY SCOUT TYPE
        public override Position[] GetValidMoves(CellSampler cs, Position pos)
        {
            var ans = new List <Position>();

            foreach (var d in Enum.GetValues(typeof(Directions)))
            {
                Position candidate      = new Position(pos, (Directions)d);
                ICell    CellInPosition = cs.SampleLocation(candidate, this.GetOwnership());
                if (CellInPosition is EmptyCell || CellInPosition is Enemy)
                {
                    ans.Add(candidate);
                }
            }

            return(ans.ToArray());
        }
Beispiel #2
0
 public override Position[] GetValidMoves(CellSampler cs, Position pos)
 {
     return(new Position[0]);
 }
Beispiel #3
0
 public abstract Position[] GetValidMoves(CellSampler cs, Position pos);