Results 1 to 3 of 3

Thread: Tic Tac Toe AI

  1. #1
    anthropamorphic's Avatar
    anthropamorphic is offline Senior Member
    Join Date
    Jun 2011
    Posts
    135
    Rep Power
    0

    Default Tic Tac Toe AI

    Hello, I have been working on a tic tac toe program and my problem is I want to build bots for it. I have already built one, but I just used a ton of if statements which doesn't seem like the most efficient way. I think their has to be a better way so if you could explain how I could make a simple bot for my game I would really appreciate it.

    I don't think you will need to see my code for this, but if you do I will happily post it, but for now just incase anyone wants to know my button variables are:
    b1, b2, b3, b4, b5, b6, b7, b8, and b9

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,332
    Rep Power
    25

    Default

    The squares for the game should be in an array. No need for individual names.
    See Tic Tac Toe Issue

  3. #3
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,789
    Rep Power
    7

    Default

    Quote Originally Posted by anthropamorphic View Post
    but for now just incase anyone wants to know my button variables are:
    b1, b2, b3, b4, b5, b6, b7, b8, and b9
    "I have a program that doesn't work but I do have a String variable called name. Hope you can help."

    You really have no idea what relevant information means.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •