acey-deucey-game-engine
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -13,3 +13,4 @@ "use strict"; | ||
canMoveOffBoard: require("./lib/can-move-off-board"), | ||
canMoveToSpace: require("./lib/can-move-to-space") | ||
canMoveToSpace: require("./lib/can-move-to-space"), | ||
findPossibleMoves: require("./lib/find-possible-moves") | ||
}; |
{ | ||
"name": "acey-deucey-game-engine", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "a game engine for the backgammon variant acey deucey", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -64,2 +64,11 @@ # acey-deucey-game-engine | ||
###`aceyDeuceyGameEngine.findPossibleMoves(gameState, selectedPieceIndex, diceRoll, isBar)` | ||
`selectedPieceIndex` is a number indicating the index of a selected piece. | ||
`diceRoll` is an array of numbers corresponding to the numbers rolled on the dice. | ||
`isBar` is a boolean indicating whether the selected piece is on the bar. | ||
Returns an array of numbers indicating the spaces that are available for the selected piece to be moved to. | ||
If `diceRoll` is a doubles roll, the array will only contain a single value. | ||
If no moves are available, the array will be empty. | ||
###`aceyDeuceyGameEngine.getAceyDeucey(diceRoll)` | ||
@@ -66,0 +75,0 @@ `diceRoll` is an array of numbers corresponding to the numbers rolled on the dice. |
133633
28
2482
138