Exemple #1
0
        internal override IList <Move> GetMoves(Hex start, Board board)
        {
            Beetle beetle     = (Beetle)top;
            var    validMoves = new List <Move>();

            beetle.GetClimbingMoves(start, board, validMoves);

            // empty spaces around are valid moves for a beetle stack
            var hivailability = Hivailability.GetHivailability(board, start);

            foreach (Hex hex in hivailability.EmptyNeighborHexes(start))
            {
                validMoves.Add(Move.GetMove(this.top, hex));
            }

            return(validMoves);
        }