code: function getColorScore(_ref, positions) {
      var startRow = _ref.startRow,
          endRow = _ref.endRow;
  
      var score = positions.reduce(function (newScore, p) {
          if (p.y === endRow) newScore.winners += 1;else newScore.preWinnersPoints += endRow === 0 ? startRow - p.y : p.y;
          return newScore;
      }, getInitialColorScore());
      score.won = score.winners === positions.length;
      return score;
  }
docs: Get color score
  
  returns { won, winners, preWinnersPoints }