🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

dots-and-boxes

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dots-and-boxes

dots and boxes game

latest
Source
npmnpm
Version
1.2.6
Version published
Maintainers
1
Created
Source

dots-and-boxes

npm version GitHub version wcs badge MIT license

Play the Dots And Boxes game against computer. Play in console or use api for own user interface.

Console Game

npm start 

or german version

npm start l=de

API

Example

const {Game} = require('dots-and-boxes');
var game = new Game({size: {x:3,y:3}, level: 2});

console.log( game.executeUserTurn( '0 0 l' ) );

{ player: 1,
line: 0,
value: 1,
complete: false,
otherTurn: [ { player: 2, line: 12, value: 1, complete: false } ] }

console.log( game.board.stringify() );

example1

console.log( game.scores );

[ 9, 0, 0 ]

Keywords

game

FAQs

Package last updated on 03 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts