A86: Tic-Tac suggested solution


[Prev][Next][Index][Thread]

A86: Tic-Tac suggested solution




I don't know what you are using as your initial values before you fill up the
matrix, like a 0 or some other number.  I suggest that you use a lower value
such as 0 for an x and a 2 for an o and a 1 for a blank square.  The reason I
say to use this configuration is all rows will initally add up to 3, an in
between value.  The winning additions would be 0 for win-x  and 6 for win-o.
It is impossible to get these two values unless it is a win.  Whatever values
you do pick  (these would be simplest) choose your x as the lowest number and
o as the highest number (or vice versa with x and o switched)   and then
choose an in between value for an uninitialized box.  Then when displaying the
board, the in between value would still register as blank and not interfere
with your scoring additions.
Tim Adkisson
Glad to help.
<a href="honorIam2@aol.com">honorIam2@aol.com</a>