From 2b310b08705d530776522b5b79eea01a5ed90286 Mon Sep 17 00:00:00 2001 From: byanofsky Date: Mon, 3 Jul 2017 17:30:37 -0700 Subject: [PATCH] Add JSDocs to evaluate board --- public/js/movecalc.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/js/movecalc.js b/public/js/movecalc.js index 419148e..68d86f7 100644 --- a/public/js/movecalc.js +++ b/public/js/movecalc.js @@ -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 = {