Пример #1
0
        public void AddStone(BoardIndex index)
        {
            if (CellStatus.Available != this[index])
            {
                throw new ArgumentException($"石を配置できない場所です。");
            }

            this.Board.PutStone(new StoneMove(index, this.Board.CurrentTurn), false);

            var connectIndex = Board.GetConnectIndex();

            if (null != connectIndex)
            {
                Result = Board[connectIndex].Value.ToResult();
            }
            else
            {
                if (!Board.ExistsAvailable)
                {
                    Result = GameResult.Draw;
                }
                else
                {
                    Result = null;
                }
            }
        }
 public GameUser?this[BoardIndex index]
 {
     get => ContainsIndex(index)
Пример #3
0
 public CellStatus this[BoardIndex index] => this.Board.GetCellStatus(index);