Why the if statment will not run? : So I am trying to make a chess game (The board is 64 buttons) and I need to check if the button that was first pressed is a certain button but for some reason the code in the if will not run.     

    public void button_click(object sender, EventArgs e)
        {
            if (partOfTurn == false)
            {
                //code

                previousButton = (Button)sender;
                partOfTurn = true;
            }

            else if (partOfTurn == true) 
            {
                //code

                click();
                partOfTurn = false;
            }

            void click()
            {
                if (turn == true)
                {
                    if (previousButton.BackgroundImage == Properties.Resources.White_Pown)
                    {
                        //unreachable code
                    }
                }
            }
        }