コードについて:メソッド名予想されるエラー - C#
私はTIC TAC TOEのゲームのためのWindowsフォームアプリケーションを作っています。これはその中のメソッドの1つです。勝者を対角線、水平、垂直にチェックします。
エラー:& &文の右辺で
、私は、「メソッド名が期待される」というエラーが表示されます。私はエラーを理解することができません。私は誰かが助けることを願っていますif文
private void checkForwinner()
{
bool there_is_a_winner= false;
//horizontal check
if((A1.Text==A2.Text)&& (A2.Text==A3.Text)(!A1.Enabled))
there_is_a_winner=true;
else if((B1.Text==B2.Text)&& (B2.Text==B3.Text)(!A2.Enabled))
there_is_a_winner=true;
else if ((C1.Text == C2.Text) && (C2.Text == C3.Text)(!A3.Enabled))
there_is_a_winner = true;
//Vertical Check
else if ((A1.Text == B1.Text) && (B1.Text == C1.Text)(!A1.Enabled))
there_is_a_winner = true;
else if ((A2.Text == B2.Text) && (B2.Text == C2.Text)(!B1.Enabled))
there_is_a_winner = true;
else if ((A3.Text == B3.Text) && (B3.Text == C3.Text)(!C1.Enabled))
there_is_a_winner = true;
//Diagonal Check
else if ((A1.Text == B2.Text) && (B2.Text == C3.Text)(!A1.Enabled))
there_is_a_winner = true;
else if ((A3.Text == B2.Text) && (B2.Text == C1.Text)(!C1.Enabled))
there_is_a_winner = true;
}
'(A2.Text == A3.Text)(!A1.Enabled)'とはどういう意味ですか?それはあなたの問題だ。 –