npm.io
0.2.2 • Published 9 years ago

tictactoewinner

Licence
MIT
Version
0.2.2
Deps
0
Vulns
0
Weekly
0

Tic Tac Toe Winner

Disclaimer

This component has been created for training purposes only. It is used to demonstrate how to work with NPM. This component should not be used for and kind of production use.

Description

Gets the winner on a Tic Tac Toe board.

Usage

var winner = getTicTacToeWinner(
  [ 0, 0, 0, 1, 1, 1, 2, 2, 0 ], // Board data
  0); // Value representing an unset field
console.log("The winner is " + winner);

Keywords