dist/Score.js
function getScore(board) {
    var pieces = Board.getPiecesFromBoard(board);
    var startEndRows = Board.getStartEndRows(board);
    var white = getColorScore(startEndRows.white, pieces.white);
    var black = getColorScore(startEndRows.black, pieces.black);
    return {
        ended: white.won || black.won,
        white: white,
        black: black
    };
}
function getScore(board) {
    var pieces = Board.getPiecesFromBoard(board);
    var startEndRows = Board.getStartEndRows(board);
    var white = getColorScore(startEndRows.white, pieces.white);
    var black = getColorScore(startEndRows.black, pieces.black);
    return {
        ended: white.won || black.won,
        white: white,
        black: black
    };
}
function getScore ( board ) { var pieces = Board . getPiecesFromBoard ( board ) ; var startEndRows = Board . getStartEndRows ( board ) ; var white = getColorScore ( startEndRows . white , pieces . white ) ; var black = getColorScore ( startEndRows . black , pieces . black ) ; return { ended : white . won || black . won , white : white , black : black } ; }
Takes a board and return Score
Takes a board and return Score