0.1.2 • Published 5 years ago

peeko.js v0.1.2

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
5 years ago

Peeko.js

The game engine handling Peeko's board position and move validation

Installation

npm install peeko.js

Usage

See peeko.ppgn for PPGN documentation.

const opn = [
  '0,0:2 2,0:1 4,0:2 6,0:1 8,0:1 10,0:1 12,0:1 14,0:3',
  '1,1:1 3,1:2 5,1:2 7,1:1 9,1:2 11,1:1 13,1:3',
  '0,2:3 2,2:2 4,2:1 6,2:1 8,2:1 10,2:2 12,2:1 14,2:1',
  '1,3:1 3,3:2 5,3:2 7,3:1 9,3:2 11,3:1 13,3:2',
  '0,4:3 2,4:2 4,4:2 6,4:2 8,4:1 10,4:2 12,4:1 14,4:3',
  '1,5:1 3,5:1 5,5:1 7,5:1 9,5:3 11,5:3 13,5:1',
  '0,6:1 2,6:2 4,6:3 6,6:1 8,6:2 10,6:1 12,6:3 14,6:2',
  '1,7:1 3,7:1 5,7:1 7,7:2 9,7:1 11,7:3 13,7:2',
  '1 4 2',
].join(' ');
const peeko = new Peeko(opn);
peeko.play('2,4');
0.1.2

5 years ago

0.1.1

5 years ago

0.0.1

5 years ago