• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1363
  • Last Modified:

Tic Tac Toe Game codes.

Hi, Experts.
For shure one of You have the 'Tic Tac Toe' game codes( X / O ) , writen on Borland C.
I need this codes: the game should have ability to play for 2 players and the ability to play one player with a computer.

If You have this codes , just paste the comment that you have it and I will paste my email address.

If it will the good for me, I will give You more than 500 points.
Thanks, RRR.
0
RRR
Asked:
RRR
  • 3
  • 3
  • 2
  • +3
1 Solution
 
IainHereCommented:
Hi 3Rs.  You're not new here, so you know that doing homework is not allowed.

You know the drill - post what you have so far, and wait for constructive criticism.
0
 
RRRAuthor Commented:
I am just need the codes.
:)

RRR.
0
 
bluprintCommented:
well, here's a two player you can download...

http://www.bloodshed.net/c/
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
IainHereCommented:
bluprint - try not to give people the answers to their homework questions.  As I pointed out above, this is not allowed, and can result in questioner *and* answerer being thrown off the site.

Not that I'm a moderator or anything, so feel free to ignore/flame me.

0
 
bluprintCommented:
Respectfully, how do you know it's a homework assignment?
0
 
Adam LeinssCommented:
Hmm, how did you get it to 500 points?  I can never set it above 200 points (use to with the old Expert-Exchange).

These links may give you some ideas:
http://www.ee.udel.edu/~six/Teaching/cisc10500f/assignments/project3/tictactoe.c

Here's a complete working one (Human vs. Human) with the C source: http://www.sftw.umac.mo/~robertb/courses/sftw120/solutions11.html

Not sure how Borland C differs from ANSI C.

This is actually a fun project to code (I did it in high school in Pascal)  It's relatively simple, because there is an algorithm where you will always tie the game.  This web site has a bit of info. on the general algorithm:

http://www.cs.colorado.edu/~zbergen/cs1300/tictactoe.html

There's a cool thing you can add such as having the program remember losing paths by setting negative values to the path it last took.  So it actually appears the program gets better as you play it more and more (assuming of course you don't program the tie-tie algorithm and just use the AI approach, otherwise it will always tie you).
0
 
Adam LeinssCommented:
hongjun: neat source code, do you know what the syntax for the moves are?  I tried x y and x,y, but nothing seems to work.  Alpha-beta pruning with tic-tac-toe, I've seen it all!
0
 
RRRAuthor Commented:
Thanks for all of you , experts.
I will try the codes and will paste my comments.
RRR.
0
 
RRRAuthor Commented:
Hi, All.
I accept the  hongjun's comments as answer because this  codes are optimal for me. Thanks for all of you.
RRR.
0
 
chicokidCommented:
IainHere: everyone is just trying to help out.  I'm sure no one is looking simply for the answer to homework and those who are will loose out in the long run.
0
 
hongjunCommented:
chicokid, can't imagine you posted a reply after almost 2 years.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now