torusgo-logic

1.1.2 • Public • Published

TorusGo - Game Logic

This Module provides functions to create and manipulate TorusGo game states. The implementation is compiled from purescript.

Installation

npm install torusgo-logic --save

Usage

const State = require('torusgo-logic').State;

const state = new State(19,19);

state.makeMove(0,0)
    .makeMove(1,1)
    .makeMove(0,1)
    .pass();

console.log(state); //output:
//‌State: { 
//  size: 4x4, 
//  moves: 4, 
//  to move: b, 
//  ko position: - 
//  b prisoners: 0, 
//  w prisoners: 0,
//  board: b,-,-,-,b,w,-,-,-,-,-,-,-,-,-,-
//}

Readme

Keywords

none

Package Sidebar

Install

npm i torusgo-logic

Weekly Downloads

1

Version

1.1.2

License

ISC

Last publish

Collaborators

  • lukasschneider