Computer Science Canada
Programming C, C++, Java, PHP, Ruby, Turing, VB
Username:
Password:
Register
Wiki
Blog
Search
Turing
Chat Room
Members
help me plz
Index
->
Programming, Turing
->
Turing Help
Author
Message
meidan
Posted:
Wed Jun 14, 2006 8:12 pm
Post subject: help me plz
how do you make a computer opponent in tic tac toe?
Sponsor
Sponsor
CodeMonkey2000
Posted:
Wed Jun 14, 2006 8:14 pm
Post subject: (No subject)
you can have a whole bunch of if statements where if this square and this square is taken, then the opponent must go in this square to block me off.
meidan
Posted:
Wed Jun 14, 2006 8:17 pm
Post subject: (No subject)
ok i know the logic but how do i say that this square is blocked and for it to go to the other square?
CodeMonkey2000
Posted:
Wed Jun 14, 2006 8:22 pm
Post subject: (No subject)
mark it.
sqre 1 is taken, so sqre1=1 and squr2 is taken sor squr2=1
if sqre1 and sqre2 =1 then you have to go to sqre3 etc...
Tony
Posted:
Wed Jun 14, 2006 8:41 pm
Post subject: (No subject)
meidan wrote:
ok i know the logic but how do i say that this square is blocked and for it to go to the other square?
how do you know if the square is blocked or not for the human player? same approach.
Tony's
programming blog
. DWITE - a
programming contest
.
meidan
Posted:
Wed Jun 14, 2006 8:47 pm
Post subject: (No subject)
ok i understand but i made my sqaures like this...
i made a box and said the coordinates so like
x >100 but <200 and y> 300 but <500 so how do i make this as a variable???
CodeMonkey2000
Posted:
Wed Jun 14, 2006 8:52 pm
Post subject: (No subject)
are you using ifs? because if you are, then you can have it within the if statement. eg. if x>30 and y<90 then squre x is taken.
Tony
Posted:
Wed Jun 14, 2006 8:54 pm
Post subject: (No subject)
perhaps you should figure out how to let a user play, before attempting to figure out how to have a computer play.
Tony's
programming blog
. DWITE - a
programming contest
.
Sponsor
Sponsor
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
Index
->
Programming, Turing
->
Turing Help
Page
1
of
1
[ 8 Posts ]
Jump to:
Select a forum
CompSci.ca
------------
- Network News
- General Discussion
General Forums
-----------------
- Hello World
- Featured Poll
- Contests
Contest Forums
-----------------
- DWITE
- [FP] Contest 2006/2008
- [FP] 2005/2006 Archive
- [FP] 2004/2005 Archive
- Off Topic
Lounges
---------
- User Lounge
- VIP Lounge
Programming
--------------
- General Programming
General Programming Forums
--------------------------------
- Functional Programming
- Logical Programming
- C
C
--
- C Help
- C Tutorials
- C Submissions
- C++
C++
----
- C++ Help
- C++ Tutorials
- C++ Submissions
- Java
Java
-----
- Java Help
- Java Tutorials
- Java Submissions
- Ruby
Ruby
-----
- Ruby Help
- Ruby Tutorials
- Ruby Submissions
- Turing
Turing
--------
- Turing Help
- Turing Tutorials
- Turing Submissions
- PHP
PHP
----
- PHP Help
- PHP Tutorials
- PHP Submissions
- Python
Python
--------
- Python Help
- Python Tutorials
- Python Submissions
- Visual Basic and Other Basics
VB
---
- Visual Basic Help
- Visual Basic Tutorials
- Visual Basic Submissions
Education
-----------
- Student Life
Graphics and Design
-----------------------
- Web Design
Web Design Forums
---------------------
- (X)HTML Help
- (X)HTML Tutorials
- Flash MX Help
- Flash MX Tutorials
- Graphics
Graphics Forums
------------------
- Photoshop Tutorials
- The Showroom
- 2D Graphics
- 3D Graphics
Teams
------
- dTeam Public
Style:
Appalachia
blueSilver
eMJay
subAppalachia
subBlue
subCanvas
subEmjay
subGrey
subSilver
subVereor
Search:
You can syndicate this boards posts using the file
backend.php
or view the
topic map using sitemap.php.
Terms of Use
|
Privacy Policy