コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["game"] == null)
     {
         Session["game"] = new TicTacToeLogic();
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["game"] == null)
     {
         Session["game"] = new TicTacToeLogic();
     }
 }
コード例 #3
0
 protected void ButtonNewGame_Click(object sender, EventArgs e)
 {
     LiteralResult.Text     = "";
     Session["game"]        = new TicTacToeLogic();
     this.Button1_1.Enabled = true;
     this.Button1_2.Enabled = true;
     this.Button1_3.Enabled = true;
     this.Button2_1.Enabled = true;
     this.Button2_2.Enabled = true;
     this.Button2_3.Enabled = true;
     this.Button3_1.Enabled = true;
     this.Button3_2.Enabled = true;
     this.Button3_3.Enabled = true;
     UpdateGameData();
 }
コード例 #4
0
 private void ComputerWins()
 {
     LiteralResult.Text = "You loose!";
     Session["game"]    = new TicTacToeLogic();
     UpdateGameData();
 }
コード例 #5
0
 private void PlayerWins()
 {
     LiteralResult.Text = "You win!";
     Session["game"]    = new TicTacToeLogic();
     UpdateGameData();
 }
コード例 #6
0
 protected void ButtonNewGame_Click(object sender, EventArgs e)
 {
     LiteralResult.Text = "";
     Session["game"] = new TicTacToeLogic();
     this.Button1_1.Enabled = true;
     this.Button1_2.Enabled = true;
     this.Button1_3.Enabled = true;
     this.Button2_1.Enabled = true;
     this.Button2_2.Enabled = true;
     this.Button2_3.Enabled = true;
     this.Button3_1.Enabled = true;
     this.Button3_2.Enabled = true;
     this.Button3_3.Enabled = true;
     UpdateGameData();
 }
コード例 #7
0
 private void ComputerWins()
 {
     LiteralResult.Text = "You loose!";
     Session["game"] = new TicTacToeLogic();
     UpdateGameData();
 }
コード例 #8
0
 private void PlayerWins()
 {
     LiteralResult.Text = "You win!";
     Session["game"] = new TicTacToeLogic();
     UpdateGameData();
 }