Exemple #1
0
        public bool MoveNext()
        {
            if (ReachedEmptyField())
            {
                return(false);
            }

            Tuple <int, int> nextCoordinates = GetNextCoordinates();

            if (InvalidPlaceForWhiteStone(nextCoordinates))
            {
                return(false);
            }

            Field nextField = _fieldsGraph.GetField(nextCoordinates);

            if (ThereIsNoStoneToJumpOver(nextField) || CantJumpAtAll(nextField))
            {
                return(false);
            }

            PerformMove(nextField);

            return(true);
        }