You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your code gives the incorrect output for the following input:
X | |
---------
X | | O
---------
| O |
If I get the best move for the computer (X), it lists spot 1, which is incorrect (it's obviously spot 6, to win). It does give the correct output for the human player (spot 6, to block the computer), though.
Here's my "origBoard" input. it follows the format you specified in the article and in the code itself. var origBoard = ["X",1, 2,"X",4 ,"O", 6 ,"O",8];
I'm running Chrome 70 on MacOS.
The text was updated successfully, but these errors were encountered:
Your code gives the incorrect output for the following input:
If I get the best move for the computer (
X
), it lists spot 1, which is incorrect (it's obviously spot 6, to win). It does give the correct output for the human player (spot 6, to block the computer), though.Here's my "origBoard" input. it follows the format you specified in the article and in the code itself.
var origBoard = ["X",1, 2,"X",4 ,"O", 6 ,"O",8];
I'm running Chrome 70 on MacOS.
The text was updated successfully, but these errors were encountered: