Beispiel #1
0
 protected virtual void OnBoardChange(BoardChangeEventArgs e)
 {
     if (BoardChangeOccured != null)
     {
         BoardChangeOccured.Invoke(this, e);
     }
 }
Beispiel #2
0
        private void BoardChanged(CheckersMove i_Move)
        {
            BoardChangeEventArgs e = new BoardChangeEventArgs();

            e.CheckersMove   = i_Move;
            e.DestSquareType = r_Board[i_Move.ToRow, i_Move.ToCol];
            e.IsEatMove      = isEatMove(i_Move);
            if (e.IsEatMove)
            {
                e.RowOfPieceRemoved = (i_Move.FromRow + i_Move.ToRow) / 2;
                e.ColOfPieceRemoved = (i_Move.FromCol + i_Move.ToCol) / 2;
            }

            OnBoardChange(e);
        }