コード例 #1
0
ファイル: BoardRow.ascx.cs プロジェクト: mneider12/TicTacToe
        public void OnBoardSpaceSelected(object sender, EventArgs eventArgs)
        {
            BoardSpace space  = (BoardSpace)sender;
            int        column = getColumn(space);
            BoardSpaceSelectedEventArgs boardSpaceSelectedEventArgs = new BoardSpaceSelectedEventArgs(column);

            BoardSpaceSelected?.Invoke(this, boardSpaceSelectedEventArgs);
        }
コード例 #2
0
ファイル: Board.ascx.cs プロジェクト: mneider12/TicTacToe
        public void OnBoardSpaceSelected(object sender, BoardSpaceSelectedEventArgs eventArgs)
        {
            BoardRow boardRow = (BoardRow)sender;
            int      row      = getRow(boardRow);

            ICoordinate coordinate = new Coordinate(row, eventArgs.Column);

            game.makeNextMove(coordinate);
        }