Solved

Tic Tac Toe Game codes.

Posted on 2002-04-24
13
1,259 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
  • 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
 
LVL 1

Expert Comment

by:bluprint
ID: 6970278
0
 
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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 500 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now