Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["game"] == null)
     {
         Session["game"] = new TicTacToeLogic();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["game"] == null)
     {
         Session["game"] = new TicTacToeLogic();
     }
 }
Beispiel #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();
 }
Beispiel #4
0
 private void ComputerWins()
 {
     LiteralResult.Text = "You loose!";
     Session["game"]    = new TicTacToeLogic();
     UpdateGameData();
 }
Beispiel #5
0
 private void PlayerWins()
 {
     LiteralResult.Text = "You win!";
     Session["game"]    = new TicTacToeLogic();
     UpdateGameData();
 }
 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();
 }
 private void ComputerWins()
 {
     LiteralResult.Text = "You loose!";
     Session["game"] = new TicTacToeLogic();
     UpdateGameData();
 }
 private void PlayerWins()
 {
     LiteralResult.Text = "You win!";
     Session["game"] = new TicTacToeLogic();
     UpdateGameData();
 }