?
Solved

Tic Tac Toe Game codes.

Posted on 2002-04-24
13
Medium Priority
?
1,322 Views
Last Modified: 2012-06-27
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
Comment
Question by:RRR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +3
13 Comments
 
LVL 4

Expert Comment

by:IainHere
ID: 6965285
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
 
LVL 3

Author Comment

by:RRR
ID: 6965308
I am just need the codes.
:)

RRR.
0
 
LVL 1

Expert Comment

by:bluprint
ID: 6970274
well, here's a two player you can download...

http://www.bloodshed.net/c/
0
Independent Software Vendors: 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!

 
LVL 4

Expert Comment

by:IainHere
ID: 6970801
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
 
LVL 1

Expert Comment

by:bluprint
ID: 6971226
Respectfully, how do you know it's a homework assignment?
0
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 6972869
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
 
LVL 33

Accepted Solution

by:
hongjun earned 2000 total points
ID: 6973271
0
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 6973458
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
 
LVL 3

Author Comment

by:RRR
ID: 6976366
Thanks for all of you , experts.
I will try the codes and will paste my comments.
RRR.
0
 
LVL 3

Author Comment

by:RRR
ID: 6993236
Hi, All.
I accept the  hongjun's comments as answer because this  codes are optimal for me. Thanks for all of you.
RRR.
0
 

Expert Comment

by:chicokid
ID: 10319278
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
 
LVL 33

Expert Comment

by:hongjun
ID: 10319892
chicokid, can't imagine you posted a reply after almost 2 years.
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question