Skip to content

Commit

Permalink
Add JSDocs to evaluate board
Browse files Browse the repository at this point in the history
  • Loading branch information
byanofsky committed Jul 4, 2017
1 parent efb8afe commit 2b310b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/js/movecalc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ var randomMove = function() {
return possibleMoves[randomIndex];
};

// Evaluates current chess board relative to player color ('w' or 'b')
/**
* Evaluates current chess board relative to player
* @param {string} color - Players color, either 'b' or 'w'
* @return {Number} board value relative to player
*/
var evaluateBoard = function(board, color) {
// Sets the value for each piece using standard piece value
var pieceValue = {
Expand Down

0 comments on commit 2b310b0

Please sign in to comment.