示例#1
0
        private bool SetPlayerMove()
        {
            bool  moveWasMade;
            Point selectedSquare = _board.GetSquare(ParentForm.MouseState.MousePosition);

            if (_board.IsRedChecker(selectedSquare.X, selectedSquare.Y))
            {
                _board.SetCellToSelected(selectedSquare.X, selectedSquare.Y);
            }

            Point selectedChecker = _board.GetSelectedSquare();

            moveWasMade = _board.MoveChecker(selectedChecker.X, selectedChecker.Y, selectedSquare.X, selectedSquare.Y);

            _board.DeSelectAllSelectionsExcept(selectedSquare.X, selectedSquare.Y);
            return(moveWasMade);
        }