ampersand-chess-state
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -5,6 +5,7 @@ var raf = require('raf'); | ||
var Engine = require('chess.js').Chess; | ||
var partial = require('./lib/partial'); | ||
var runEngine = require('./lib/runEngine'); | ||
var runOnFen = runEngine(['fen']); | ||
var runOnPgn = runEngine(['pgn']); | ||
var runOnFen = partial(runEngine, ['fen']); | ||
var runOnPgn = partial(runEngine, ['pgn']); | ||
@@ -11,0 +12,0 @@ // Used for loading possibly invalid pgns without |
@@ -1,5 +0,4 @@ | ||
var curry = require('curry'); | ||
var GUARD_KEY = '__engine_guard'; | ||
module.exports = curry(function runEngine (prop, method, guard) { | ||
module.exports = function runEngine (prop, method, guard) { | ||
return { | ||
@@ -32,2 +31,2 @@ // guard means this property will be "frozen" once the game is finished | ||
}; | ||
}); | ||
}; |
{ | ||
"name": "ampersand-chess-state", | ||
"description": "An evented chess library for movement, validation and result detection built on Ampersand.js.", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"author": "Luke Karrys <luke@lukekarrys.com>", | ||
"dependencies": { | ||
"ampersand-state": "^4.4.4", | ||
"chess.js": "^0.1.0", | ||
"curry": "^1.2.0", | ||
"chess.js": "git+ssh://git@github.com/jhlywa/chess.js.git#master", | ||
"raf": "^2.0.4" | ||
@@ -11,0 +10,0 @@ }, |
@@ -60,3 +60,3 @@ ampersand-chess-state | ||
## `props` | ||
### `props` | ||
@@ -84,3 +84,3 @@ #### `fen` (string) | ||
## `derived` | ||
### `derived` | ||
@@ -156,3 +156,3 @@ #### `future` (array) | ||
## Methods | ||
### Methods | ||
@@ -186,7 +186,7 @@ All these methods change the position in someway and will trigger changes in `fen` and `pgn`. They take an `options` object as the last parameter which will be passed along when `set` is called on `fen` and/or `pgn`. | ||
### Tests | ||
## Tests | ||
Run `npm test` for the command line tests (using phantomjs) or `npm start` to open a browser with the tests. | ||
### LICENSE | ||
## LICENSE | ||
MIT |
@@ -50,3 +50,3 @@ var test = require('tape'); | ||
t.equal(chess.pgn, '[SetUp "2n1r3/p1k2pp1/B1p3b1/P7/5bP1/2N1B3/1P2KP2/2R5 b - - 4 25"]\n[FEN "1"]\n'); | ||
t.equal(chess.pgn, '[SetUp "1"]\n[FEN "2n1r3/p1k2pp1/B1p3b1/P7/5bP1/2N1B3/1P2KP2/2R5 b - - 4 25"]\n'); | ||
@@ -444,3 +444,3 @@ t.end(); | ||
chess.fen = 'rnbqkbnr/p1pppp1p/1p6/6p1/8/2NPP3/PPPQ1PPP/R1B1KBNR w KQkq - 0 5'; | ||
t.equal(chess.pgn, '[SetUp "rnbqkbnr/p1pppp1p/1p6/6p1/8/2NPP3/PPPQ1PPP/R1B1KBNR w KQkq - 0 5"]\n[FEN "1"]\n'); | ||
t.equal(chess.pgn, '[SetUp "1"]\n[FEN "rnbqkbnr/p1pppp1p/1p6/6p1/8/2NPP3/PPPQ1PPP/R1B1KBNR w KQkq - 0 5"]\n'); | ||
@@ -447,0 +447,0 @@ t.end(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41272
3
12
839
1
- Removedcurry@^1.2.0
- Removedchess.js@0.1.0(transitive)
- Removedcurry@1.2.0(transitive)
Updatedchess.js@git+ssh://git@github.com/jhlywa/chess.js.git#master