Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect output for certain inputs. #2

Open
Legend-of-iPhoenix opened this issue Dec 3, 2018 · 1 comment
Open

Incorrect output for certain inputs. #2

Legend-of-iPhoenix opened this issue Dec 3, 2018 · 1 comment

Comments

@Legend-of-iPhoenix
Copy link

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.

@vital1312
Copy link

so, did u find the fix? thx in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants