コード例 #1
0
ファイル: Home.cs プロジェクト: DimuthuLakmal/TickTackToev1.0
        private void metroButton2_Click(object sender, EventArgs e)
        {

            String mySymbol, otherPlayerSymbol;
            if (serverOrClient != "single")
            {
                if (plyerSymbol == "circle")
                {
                    mySymbol = "circle";
                    otherPlayerSymbol = "cross";
                }
                else
                {
                    mySymbol = "cross";
                    otherPlayerSymbol = "circle";
                }
                TickTackToe t = new TickTackToe(playerName, otherPlayerName, mySymbol, otherPlayerSymbol, serverOrClient, s);
                this.Hide();
                t.Show();
            }
            else
            {
                TickTackToe t = new TickTackToe(playerName, plyerSymbol);
                this.Hide();
                t.Show();
            }

        }
コード例 #2
0
 public void TestTypeO3()
 {
     var testclass = new TickTackToe();
     var output = testclass.getScore(new String[] { " ", " ", " ", " ", " ", " ", "o", "o", "o" });
     Assert.AreEqual(1, output);
 }