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?
Tic-Tac-Toe
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.
-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.