ai-tic-tac-toe

1.1.1 • Public • Published

ai-tic-tac-toe

a simple AI for tic-tac-toe

Installation

 npm i ai-tic-tac-toe

Usage

 let tictactoe = require('ai-tic-tac-toe');
 let board = ['x','x','o',
              '','o','',
              '','','']
let position = tictactoe.getmove(board,'x');//solve for x
console.log(position);
//=> 6

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i ai-tic-tac-toe

    Weekly Downloads

    3

    Version

    1.1.1

    License

    ISC

    Unpacked Size

    2.98 kB

    Total Files

    3

    Last publish

    Collaborators

    • dovid_crow