Beispiel #1
0
        public void Initialyze(int fieldSize)
        {
            _gameField = new Field.Models.Field(fieldSize);

            FirstPlayerMove = true;

            FieldChanged();
        }
Beispiel #2
0
        private void CheckChains(byte priorityDot)
        {
            CalculateClosedDots(priorityDot);

            for (var i = 0; i < _gameField.Size; i++)
            {
                for (var j = 0; j < _gameField.Size; j++)
                {
                    if (_gameField[i][j].Closed && _gameField[i][j].Active)
                    {
                        Field.Models.Field oldField = _gameField.Clone();
                        var  isEficientChain        = false;
                        bool isChain = FindChain(i, j, priorityDot, ref isEficientChain);
                        if (!isChain || !isEficientChain)
                        {
                            _gameField = oldField;
                        }
                    }
                }
            }
        }