Exemplo n.º 1
0
        public void cleanBoard()
        {
            if (puzzleBoard == null)
            {
                return;
            }
            if (puzzleBoard.getListOfParts() == null)
            {
                return;
            }

            List <Piece> parts = puzzleBoard.getListOfParts();

            foreach (Piece part in parts)
            {
                flowLayoutPanel2.Controls.Remove(part.getPiecePicBox());
            }
        }
Exemplo n.º 2
0
        //cheking if PictureBox exist on board
        public bool chekOnBoard(PictureBox chekingPicBox)
        {
            List <Piece> boardParts = board.getListOfParts();

            foreach (Piece boardPiece in boardParts)
            {
                if (chekingPicBox.Image == boardPiece.getPiecePicBox().Image)
                {
                    return(true);
                }
            }
            return(false);
        }