Tic Tac Toe

08/05/2013 22:03 BloodWork.#1
Hey noobs,

here is my new Tic Tac Toe Game.
Downloads: ca. 50 !

Download: [Only registered and activated users can see links. Click Here To Register...]
VirusTotal: [Only registered and activated users can see links. Click Here To Register...]

I will add a Screen soon.

Have fun !
08/06/2013 00:09 Ludder231#2
Thats should be in the "Release" section. And you are the only "noob" here. Everybody can code a Tic Tac Toe
08/06/2013 03:23 dready#3
Noobs .. realy man ?

Ok ..

1. Name your stuff properly

[Only registered and activated users can see links. Click Here To Register...]

2.

Example Code:

Code:
 private void Button6_Click(object sender, EventArgs e)
    {
      if (Operators.CompareString(this.Label2.Text, "X", false) == 0)
      {
        this.Button6.Text = "X";
        this.Label2.Text = "0";
      }
      else
      {
        this.Button6.Text = "0";
        this.Label2.Text = "X";
      }
      this.win();
      this.Button6.Enabled = false;
    }

    private void Button7_Click(object sender, EventArgs e)
    {
      if (Operators.CompareString(this.Label2.Text, "X", false) == 0)
      {
        this.Button7.Text = "X";
        this.Label2.Text = "0";
      }
      else
      {
        this.Button7.Text = "0";
        this.Label2.Text = "X";
      }
      this.win();
      this.Button7.Enabled = false;

etc...
    }
The same code over and over again is bad style and a pain for maintaining, your Task, think about a way to solve this :)

3.

Example Code:

Code:
 if (Operators.CompareString(this.Button1.Text, "X", false) == 0 & Operators.CompareString(this.Button2.Text, "X", false) == 0 & Operators.CompareString(this.Button3.Text, "X", false) == 0)
      {
        this.Label2.Text = "X wins";
        this.Button1.Enabled = false;
        this.Button2.Enabled = false;
        this.Button3.Enabled = false;
        this.Button4.Enabled = false;
        this.Button5.Enabled = false;
        this.Button6.Enabled = false;
        this.Button7.Enabled = false;
        this.Button8.Enabled = false;
        this.Button9.Enabled = false;
      }
      if (Operators.CompareString(this.Button4.Text, "X", false) == 0 & Operators.CompareString(this.Button5.Text, "X", false) == 0 & Operators.CompareString(this.Button6.Text, "X", false) == 0)
      {
        this.Label2.Text = "X wins";
        this.Button1.Enabled = false;
        this.Button2.Enabled = false;
        this.Button3.Enabled = false;
        this.Button4.Enabled = false;
        this.Button5.Enabled = false;
        this.Button6.Enabled = false;
        this.Button7.Enabled = false;
        this.Button8.Enabled = false;
        this.Button9.Enabled = false;
      }

etc ..
Same again, think about an algorithm which is able to calculate who is the winner.
08/06/2013 10:32 Acin™#4
Quote:
Originally Posted by dready View Post
Noobs .. realy man ?

Ok ..

1. Name your stuff properly

[Only registered and activated users can see links. Click Here To Register...]

2.

Example Code:

Code:
 private void Button6_Click(object sender, EventArgs e)
    {
      if (Operators.CompareString(this.Label2.Text, "X", false) == 0)
      {
        this.Button6.Text = "X";
        this.Label2.Text = "0";
      }
      else
      {
        this.Button6.Text = "0";
        this.Label2.Text = "X";
      }
      this.win();
      this.Button6.Enabled = false;
    }

    private void Button7_Click(object sender, EventArgs e)
    {
      if (Operators.CompareString(this.Label2.Text, "X", false) == 0)
      {
        this.Button7.Text = "X";
        this.Label2.Text = "0";
      }
      else
      {
        this.Button7.Text = "0";
        this.Label2.Text = "X";
      }
      this.win();
      this.Button7.Enabled = false;

etc...
    }
The same code over and over again is bad style and a pain for maintaining, your Task, think about a way to solve this :)

3.

Example Code:

Code:
 if (Operators.CompareString(this.Button1.Text, "X", false) == 0 & Operators.CompareString(this.Button2.Text, "X", false) == 0 & Operators.CompareString(this.Button3.Text, "X", false) == 0)
      {
        this.Label2.Text = "X wins";
        this.Button1.Enabled = false;
        this.Button2.Enabled = false;
        this.Button3.Enabled = false;
        this.Button4.Enabled = false;
        this.Button5.Enabled = false;
        this.Button6.Enabled = false;
        this.Button7.Enabled = false;
        this.Button8.Enabled = false;
        this.Button9.Enabled = false;
      }
      if (Operators.CompareString(this.Button4.Text, "X", false) == 0 & Operators.CompareString(this.Button5.Text, "X", false) == 0 & Operators.CompareString(this.Button6.Text, "X", false) == 0)
      {
        this.Label2.Text = "X wins";
        this.Button1.Enabled = false;
        this.Button2.Enabled = false;
        this.Button3.Enabled = false;
        this.Button4.Enabled = false;
        this.Button5.Enabled = false;
        this.Button6.Enabled = false;
        this.Button7.Enabled = false;
        this.Button8.Enabled = false;
        this.Button9.Enabled = false;
      }

etc ..
Same again, think about an algorithm which is able to calculate who is the winner.
Whats that shitty code?
Never heard from arrays/GDI+?