Skip to content

Incorrect output for certain inputs. #2

@Legend-of-iPhoenix

Description

@Legend-of-iPhoenix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions