Page 1 of 1

Tic-Tac-Toe

Posted: Tue Jan 22, 2008 11:59 am
by TomTom224
Hey guys, I'm having a lot of trouble in QBasic.

I'm trying to figure out the logic I need to use to write Tic-Tac-Toe in QBasic using subscripted variables in order to have the computer be able to make moves. I've worked out that there's an order of logic to use, where first the computer should see if it can win. If it can, make that move. Then it should check if there's any place required to block, and then make that move...And so forth. I'm trying to use loops and subscripted variables, but I just can't seem to get it right. Can someone help me out?

Posted: Tue Jan 22, 2008 12:06 pm
by Nodtveidt
Can you post what you have so far?

Posted: Fri Nov 14, 2008 12:42 pm
by sebman
I think the best way to make the computer 'think' is
-first check all possiblilities for winning in 1 move.
-Then check if the computer can block the human player if he can win in 1 move
-If not both then just put a cross (or circle) near another cross (or circle).

The best to do that is by filling the prog with very much IF statements.