This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TicTacToe - Computer's move

 
Max Horstmann
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi this is my first message in this forum, I'll try to be the part of this community by time.

I need a help on the TicTacToe game that I am working on it. There is no error or I don't have any problem,but the thing that I want to learn is how to set the computer to make its move. I am not going to set a complex algorithm,because I am not working on algorithms I just wanted set a simple move pattern by myself.I need to see an example just for a move then I'll take care the rest of it.

For example; I want the computer(symbol O) to play the middle square, if is not occupied. Could you show and explain to me how to do the move for this particular way, please?

You can compile and run the program there is no error, after you made your move, the computer doesn't play because strategy.java is empty. I need help on that class. If you are interested here is the codes.Thanks

TicTacToe.java


LeftPanel.java


GamePanel.java


Board.java


Strategy.java (I need help here)
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Bone XXX", please check your private messages. You can see them by clicking My Private Messages.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic